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.
be-optimumoh/src/equipment_sparepart/model.py

13 lines
588 B
Python

from sqlalchemy import UUID, Column, Float, ForeignKey, String
from sqlalchemy.orm import relationship
from src.database.core import Base
from src.models import DefaultMixin
class ScopeEquipmentPart(Base, DefaultMixin):
__tablename__ = 'oh_ms_scope_equipment_part'
required_stock = Column(Float, nullable=False, default=0)
sparepart_id = Column(UUID(as_uuid=True), ForeignKey('oh_ms_sparepart.id'), nullable=False)
location_tag = Column(String, nullable=False)
location_tag = Column(String, nullable=False)
part = relationship('MasterSparePart', lazy='selectin')