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.
18 lines
742 B
Python
18 lines
742 B
Python
|
|
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")
|