[WorkOrders] Implementation (Router) #171

Closed
opened 2025-12-12 17:08:02 +00:00 by GFMpt13 · 0 comments
GFMpt13 commented 2025-12-12 17:08:02 +00:00 (Migrated from github.com)
  • Create src/routers/work_orders.py.

  • POST /: Create a new WO. Retrieve current user UUID for created_by_id. Handle 409 Conflict.

  • GET /{id}: Retrieve single WO.

  • GET /: List WOs with query params:

  • ?work_order_number={str} -> Calls repo.get_by_work_order_number.

  • ?vehicle_id={id}&active_only=true -> Calls repo.get_active_by_vehicle_id.

  • ?vehicle_id={id} -> Calls repo.get_by_vehicle_id.

  • ?client_id={id} -> Calls repo.get_by_client_id.

  • PATCH /{id}: Update WO using WorkOrderUpdate schema.

  • DELETE /{id}: Delete a WO.

- [x] Create src/routers/work_orders.py. - [x] POST /: Create a new WO. Retrieve current user UUID for created_by_id. Handle 409 Conflict. - [x] GET /{id}: Retrieve single WO. - [x] GET /: List WOs with query params: - ?work_order_number={str} -> Calls repo.get_by_work_order_number. - ?vehicle_id={id}&active_only=true -> Calls repo.get_active_by_vehicle_id. - ?vehicle_id={id} -> Calls repo.get_by_vehicle_id. - ?client_id={id} -> Calls repo.get_by_client_id. - [x] PATCH /{id}: Update WO using WorkOrderUpdate schema. - [x] DELETE /{id}: Delete a WO.
Sign in to join this conversation.
No description provided.