from sqlalchemy import UUID, Column, DateTime, Float, ForeignKey, Integer, String from src.database.core import Base from src.models import DefaultMixin from .enums import OverhaulStatus class OverhaulHistory(Base, DefaultMixin): __tablename__ = "oh_tr_overhaul_history" scope_id = Column(UUID(as_uuid=True), ForeignKey( "oh_scope.id"), nullable=True) schedule_start_date = Column(DateTime(timezone=True)) schedule_end_date = Column(DateTime(timezone=True)) total_cost = Column(Float, nullable=False, default=0) status = Column(String, nullable=False, default=OverhaulStatus.PLANNED) maximo_id = Column(String, nullable=True, comment="Id From MAXIMO regarding overhaul schedule")