| Version 1 (modified by , 2 weeks ago) ( diff ) |
|---|
UseCase11 - Leave a VetClinic review
Initiating actor: Client
Description
A logged-in client can submit a review about a vet clinic in the system. A client can review a vet clinic only if the client has at least one completed (DONE) appointment at that clinic for at least one of their pets(he is the current owner).
Scenario
- Client opens the clinics page.
SELECT clinic_id, name, city, address FROM vet_clinics WHERE clinic_id = $1;
- Clicks the "Leave review" button.
- Client enters rating, comment and submits.
BEGIN; INSERT INTO reviews (reviewer_id, rating, comment, created_at) VALUES ($1, $2, $3, NOW()) RETURNING review_id; INSERT INTO clinic_reviews (review_id, target_clinic_id) VALUES ($4, $5); COMMIT;
Note:
See TracWiki
for help on using the wiki.
