You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
871 B
Python
35 lines
871 B
Python
|
|
from datetime import datetime
|
|
from typing import Any, Dict, List, Optional
|
|
from uuid import UUID
|
|
|
|
from pydantic import Field
|
|
from src.models import DefultBase, Pagination
|
|
from src.scope_equipment.schema import MasterEquipmentRead
|
|
|
|
|
|
class OverhaulActivityBase(DefultBase):
|
|
pass
|
|
|
|
|
|
class OverhaulActivityCreate(OverhaulActivityBase):
|
|
assetnums: List[str]
|
|
|
|
|
|
class OverhaulActivityUpdate(OverhaulActivityBase):
|
|
material_cost: Optional[float] = Field(0)
|
|
service_cost: Optional[float] = Field(0)
|
|
|
|
|
|
class OverhaulActivityRead(OverhaulActivityBase):
|
|
id: UUID
|
|
material_cost: Optional[float] = Field(0)
|
|
service_cost: Optional[float] = Field(0)
|
|
assetnum: str = Field(..., description="Assetnum is required")
|
|
status: str
|
|
equipment: MasterEquipmentRead
|
|
|
|
|
|
class OverhaulActivityPagination(Pagination):
|
|
items: List[OverhaulActivityRead] = []
|