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.
29 lines
857 B
Python
29 lines
857 B
Python
|
|
from sqlalchemy import Column, DateTime, Float, Integer, String, UUID, ForeignKey
|
|
from src.database.core import Base
|
|
from src.models import DefaultMixin, IdentityMixin, TimeStampMixin
|
|
from sqlalchemy.orm import relationship
|
|
|
|
|
|
class OverhaulJob(Base, DefaultMixin):
|
|
__tablename__ = "oh_tr_overhaul_job"
|
|
|
|
overhaul_activity_id = Column(UUID(as_uuid=True), ForeignKey(
|
|
"oh_tr_overhaul_activity.id"), nullable=False)
|
|
|
|
scope_equipment_job_id = Column(UUID(as_uuid=True), ForeignKey(
|
|
"oh_ms_scope_equipment_job.id", ondelete="cascade"), nullable=False)
|
|
|
|
|
|
|
|
notes = Column(String, nullable=True)
|
|
status = Column(String, nullable=True, default="pending")
|
|
|
|
scope_equipment_job = relationship(
|
|
"ScopeEquipmentJob", lazy="raise"
|
|
)
|
|
|
|
overhaul_activity = relationship(
|
|
"OverhaulActivity", lazy="raise"
|
|
)
|