[Appointments] - Implement CRUD Operations to Pass Tests #123

Closed
opened 2025-11-05 20:52:32 +00:00 by duarteneves5 · 0 comments
duarteneves5 commented 2025-11-05 20:52:32 +00:00 (Migrated from github.com)

Fill in the logic for the interface methods created in the first sub-issue until all tests written in the second sub-issue pass.

Tasks:

  • Implement create_appointment (using Appointment(**data).save()).
  • Implement get_appointment_by_id (using Appointment.get()).
  • Implement get_appointments_by_vehicle_id (using Appointment.find(Appointment.vehicle_id == ...).to_list()).
  • Implement get_appointments_by_client_id (using Appointment.find(Appointment.client_id == ...).to_list()).
  • Implement update_appointment (finding the appointment, applying updates, and saving).
  • Implement delete_appointment (finding the appointment and calling delete()).
  • Run pytest and confirm all tests now pass.
Fill in the logic for the interface methods created in the first sub-issue until all tests written in the second sub-issue pass. **Tasks:** - [ ] Implement `create_appointment` (using `Appointment(**data).save()`). - [ ] Implement `get_appointment_by_id` (using `Appointment.get()`). - [ ] Implement `get_appointments_by_vehicle_id` (using `Appointment.find(Appointment.vehicle_id == ...).to_list()`). - [ ] Implement `get_appointments_by_client_id` (using `Appointment.find(Appointment.client_id == ...).to_list()`). - [ ] Implement `update_appointment` (finding the appointment, applying updates, and saving). - [ ] Implement `delete_appointment` (finding the appointment and calling `delete()`). - [ ] Run `pytest` and confirm all tests now pass.
Sign in to join this conversation.
No description provided.