25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

maintenancejob.py 605 B

1234567891011121314151617181920212223
  1. from pydantic import BaseModel, Field
  2. from datetime import datetime
  3. from typing import List, Optional
  4. from schemas.carpart import ShowCarPart
  5. from schemas.user import ShowUser
  6. from schemas.vehicle import OutputVehicle
  7. class CreateMaintenanceJob(BaseModel):
  8. Description: str = Field(...)
  9. VehicleID: int = Field(...)
  10. VehicleDriverId: int = Field(...)
  11. Date: datetime = Field(...)
  12. class OutputMaintenanceJob(BaseModel):
  13. Id: int
  14. Description: str
  15. Date: datetime
  16. CarPartsList: Optional[List[ShowCarPart]]
  17. TotalCost: int
  18. Vehicle: OutputVehicle
  19. AssignedTo: ShowUser