72 lines
4.2 KiB
Python
72 lines
4.2 KiB
Python
from datetime import date, datetime
|
|
|
|
from sqlalchemy import Column, Date, DateTime, Integer, SmallInteger, String
|
|
|
|
from app.core.database import Base
|
|
|
|
|
|
class BizCleanroomGarment(Base):
|
|
"""洁净服信息 biz_cleanroom_garment"""
|
|
|
|
__tablename__ = "biz_cleanroom_garment"
|
|
|
|
id = Column(String(64), primary_key=True, comment="主键ID")
|
|
garment_code = Column(String(64), nullable=False, comment="编号")
|
|
garment_name = Column(String(100), nullable=False, comment="名称")
|
|
wash_discard_limit = Column(Integer, nullable=False, comment="清洗几次需废弃")
|
|
sterilize_discard_limit = Column(Integer, nullable=False, comment="灭菌几次需废弃")
|
|
inbound_date = Column(Date, nullable=False, comment="入库日期")
|
|
discard_date = Column(Date, nullable=True, comment="废弃日期")
|
|
garment_status = Column(String(16), nullable=False, default="zc", comment="zc-正常 yfq-已废弃")
|
|
tenant_no = Column(String(64), nullable=False, default="zkxw", comment="租户编号")
|
|
order_num = Column(Integer, nullable=True, comment="排序号")
|
|
remark = Column(String(512), nullable=True, comment="备注")
|
|
create_by = Column(String(64), nullable=True, comment="创建人id")
|
|
create_dept_id = Column(String(64), nullable=False, default="", comment="创建人部门ID")
|
|
create_time = Column(DateTime, nullable=False, default=datetime.now, comment="创建时间")
|
|
update_by = Column(String(64), nullable=True, comment="更新人id")
|
|
update_time = Column(DateTime, nullable=False, default=datetime.now, onupdate=datetime.now, comment="更新时间")
|
|
del_flag = Column(SmallInteger, nullable=False, default=0, comment="删除标记")
|
|
|
|
|
|
class BizCleanroomGarmentWashLog(Base):
|
|
"""洁净服清洗记录 biz_cleanroom_garment_wash_log"""
|
|
|
|
__tablename__ = "biz_cleanroom_garment_wash_log"
|
|
|
|
id = Column(String(64), primary_key=True, comment="主键ID")
|
|
garment_id = Column(String(64), nullable=False, comment="洁净服ID")
|
|
wash_time = Column(DateTime, nullable=False, comment="清洗时间")
|
|
operator_user_id = Column(String(64), nullable=True, comment="登记人用户ID")
|
|
operator_name = Column(String(100), nullable=True, comment="登记人姓名")
|
|
tenant_no = Column(String(64), nullable=False, default="zkxw", comment="租户编号")
|
|
order_num = Column(Integer, nullable=True, comment="排序号")
|
|
remark = Column(String(512), nullable=True, comment="备注")
|
|
create_by = Column(String(64), nullable=True, comment="创建人id")
|
|
create_dept_id = Column(String(64), nullable=False, default="", comment="创建人部门ID")
|
|
create_time = Column(DateTime, nullable=False, default=datetime.now, comment="创建时间")
|
|
update_by = Column(String(64), nullable=True, comment="更新人id")
|
|
update_time = Column(DateTime, nullable=False, default=datetime.now, onupdate=datetime.now, comment="更新时间")
|
|
del_flag = Column(SmallInteger, nullable=False, default=0, comment="删除标记")
|
|
|
|
|
|
class BizCleanroomGarmentSterilizeLog(Base):
|
|
"""洁净服灭菌记录 biz_cleanroom_garment_sterilize_log"""
|
|
|
|
__tablename__ = "biz_cleanroom_garment_sterilize_log"
|
|
|
|
id = Column(String(64), primary_key=True, comment="主键ID")
|
|
garment_id = Column(String(64), nullable=False, comment="洁净服ID")
|
|
sterilize_time = Column(DateTime, nullable=False, comment="灭菌时间")
|
|
operator_user_id = Column(String(64), nullable=True, comment="登记人用户ID")
|
|
operator_name = Column(String(100), nullable=True, comment="登记人姓名")
|
|
tenant_no = Column(String(64), nullable=False, default="zkxw", comment="租户编号")
|
|
order_num = Column(Integer, nullable=True, comment="排序号")
|
|
remark = Column(String(512), nullable=True, comment="备注")
|
|
create_by = Column(String(64), nullable=True, comment="创建人id")
|
|
create_dept_id = Column(String(64), nullable=False, default="", comment="创建人部门ID")
|
|
create_time = Column(DateTime, nullable=False, default=datetime.now, comment="创建时间")
|
|
update_by = Column(String(64), nullable=True, comment="更新人id")
|
|
update_time = Column(DateTime, nullable=False, default=datetime.now, onupdate=datetime.now, comment="更新时间")
|
|
del_flag = Column(SmallInteger, nullable=False, default=0, comment="删除标记")
|