Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

maintenancejob.py 466 B

12345678910111213141516171819
  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. class CreateMaintenanceJob(BaseModel):
  7. Description: str = Field(...)
  8. Date: datetime = Field(...)
  9. class OutputMaintenanceJob(BaseModel):
  10. Id: int
  11. Description: str
  12. Date: datetime
  13. CarPartsList: Optional[List[ShowCarPart]]
  14. TotalCost: int
  15. AssignedTo: ShowUser