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.
70 lines
1.7 KiB
Python
70 lines
1.7 KiB
Python
from datetime import datetime
|
|
from typing import Any, Dict, List, Optional
|
|
from uuid import UUID
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
from src.models import DefultBase, Pagination
|
|
|
|
|
|
class ScopeEquipmentActivityBase(DefultBase):
|
|
assetnum: str = Field(..., description="Assetnum is required")
|
|
|
|
|
|
class ScopeEquipmentActivityCreate(ScopeEquipmentActivityBase):
|
|
name: str
|
|
cost: Optional[float] = Field(0)
|
|
|
|
|
|
class ScopeEquipmentActivityUpdate(ScopeEquipmentActivityBase):
|
|
name: Optional[str] = Field(None)
|
|
cost: Optional[str] = Field(0)
|
|
|
|
|
|
class ScopeEquipmentActivityRead(ScopeEquipmentActivityBase):
|
|
name: str
|
|
cost: float
|
|
|
|
|
|
class ScopeEquipmentActivityPagination(Pagination):
|
|
items: List[ScopeEquipmentActivityRead] = []
|
|
|
|
|
|
# {
|
|
# "overview": {
|
|
# "totalEquipment": 30,
|
|
# "nextSchedule": {
|
|
# "date": "2025-01-12",
|
|
# "Overhaul": "B",
|
|
# "equipmentCount": 30
|
|
# }
|
|
# },
|
|
# "criticalParts": [
|
|
# "Boiler feed pump",
|
|
# "Boiler reheater system",
|
|
# "Drum Level (Right) Root Valve A",
|
|
# "BCP A Discharge Valve",
|
|
# "BFPT A EXH Press HI Root VLV"
|
|
# ],
|
|
# "schedules": [
|
|
# {
|
|
# "date": "2025-01-12",
|
|
# "Overhaul": "B",
|
|
# "status": "upcoming"
|
|
# }
|
|
# // ... other scheduled overhauls
|
|
# ],
|
|
# "systemComponents": {
|
|
# "boiler": {
|
|
# "status": "operational",
|
|
# "lastOverhaul": "2024-06-15"
|
|
# },
|
|
# "turbine": {
|
|
# "hpt": { "status": "operational" },
|
|
# "ipt": { "status": "operational" },
|
|
# "lpt": { "status": "operational" }
|
|
# }
|
|
# // ... other major components
|
|
# }
|
|
# }
|