[WorkOrders] - Implement CRUD Operations to Pass Tests #113

Closed
opened 2025-11-05 20:11:44 +00:00 by duarteneves5 · 0 comments
duarteneves5 commented 2025-11-05 20:11:44 +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_workOrder (using WorkOrder(**data).save()).
  • Implement get_workOrder_by_id (using WorkOrder.get()).
  • Implement get_workOrders_by_client_id (using WorkOrder.find(WorkOrder.client_id == ...).to_list()).
  • Implement get_workOrders_by_vehicle_id (using WorkOrder.find(WorkOrder.vehicle_id == ...).to_list()).
  • Implement get_workOrders_by_appointment_id (using WorkOrder.find(WorkOrder.appointment_id == ...).to_list()).
  • Implement update_workOrder (finding the work order, applying updates, and saving).
  • Implement delete_workOrder (finding the work order 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:** - [x] Implement `create_workOrder` (using `WorkOrder(**data).save()`). - [x] Implement `get_workOrder_by_id` (using `WorkOrder.get()`). - [x] Implement `get_workOrders_by_client_id` (using `WorkOrder.find(WorkOrder.client_id == ...).to_list()`). - [x] Implement `get_workOrders_by_vehicle_id` (using `WorkOrder.find(WorkOrder.vehicle_id == ...).to_list()`). - [x] Implement `get_workOrders_by_appointment_id` (using `WorkOrder.find(WorkOrder.appointment_id == ...).to_list()`). - [x] Implement `update_workOrder` (finding the work order, applying updates, and saving). - [x] Implement `delete_workOrder` (finding the work order and calling `delete()`). - [x] Run `pytest` and confirm all tests now pass.
Sign in to join this conversation.
No description provided.