@@ -0,0 +1,21 @@
|
||||
from sqlalchemy import Boolean, Column, Float, ForeignKey, Integer, String
|
||||
|
||||
from app import db
|
||||
from app.models.base import SoftDeleteMixin, TimestampMixin, default_uuid
|
||||
|
||||
from ._mixins import LabAuditMixin
|
||||
|
||||
|
||||
class LabRationLine(db.Model, TimestampMixin, SoftDeleteMixin, LabAuditMixin):
|
||||
__tablename__ = "lab_ration_line"
|
||||
|
||||
id = Column(String(36), primary_key=True, default=default_uuid)
|
||||
recipe_id = Column(String(36), ForeignKey("recipe.id"), nullable=False, index=True)
|
||||
component_id = Column(
|
||||
String(36), ForeignKey("component.id"), nullable=True, index=True
|
||||
)
|
||||
row_index = Column(Integer, nullable=False, default=0)
|
||||
ingredient_name = Column(String(200), nullable=True)
|
||||
daily_kg = Column(Float, nullable=True)
|
||||
in_ration = Column(Boolean, nullable=False, default=True)
|
||||
in_compound = Column(Boolean, nullable=False, default=False)
|
||||
Reference in New Issue
Block a user