2660 lines
165 KiB
Python
2660 lines
165 KiB
Python
"""数据模型(与 docs/sql/zkxw.sql 全库导出基线对齐的核心系统表)"""
|
||
from datetime import datetime
|
||
import enum
|
||
|
||
from sqlalchemy import Column, String, DateTime, Integer, Text, CHAR, SmallInteger, Numeric
|
||
|
||
from app.core.database import Base
|
||
|
||
|
||
class UserRole(str, enum.Enum):
|
||
"""Web 管理端约定角色(由 sys_role.role_name 映射而来,非数据库枚举)"""
|
||
|
||
ADMIN = "admin"
|
||
SUPER_ADMIN = "super_admin"
|
||
|
||
|
||
# =============================================================================
|
||
# V0.3 用户 / 角色 / 菜单(2.1.4 ~ 2.1.6)
|
||
# =============================================================================
|
||
|
||
|
||
class SysUser(Base):
|
||
"""用户表 sys_user(V0.3)"""
|
||
|
||
__tablename__ = "sys_user"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
dept_id = Column(String(64), nullable=True, comment="部门ID")
|
||
user_no = Column(String(30), nullable=False, comment="用户账号")
|
||
nick_name = Column(String(30), nullable=False, comment="用户名")
|
||
email = Column(String(50), nullable=False, default="", comment="用户邮箱")
|
||
phone_no = Column(String(11), nullable=False, default="", comment="手机号码")
|
||
sex = Column(CHAR(1), nullable=True, default="0", comment="用户性别")
|
||
avatar = Column(String(512), nullable=True, comment="头像")
|
||
password = Column("password", String(100), nullable=False, default="", comment="密码")
|
||
status = Column(CHAR(1), nullable=False, default="1", comment="帐号状态 1正常 0停用")
|
||
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="删除标记 0正常 1已删除")
|
||
|
||
|
||
class SysRole(Base):
|
||
"""角色表 sys_role(V0.3)"""
|
||
|
||
__tablename__ = "sys_role"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
role_name = Column(String(30), nullable=False, comment="角色名称")
|
||
data_scope = Column(CHAR(1), nullable=True, default="1", comment="数据权限")
|
||
status = Column(CHAR(1), nullable=False, default="1", 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 SysUserRole(Base):
|
||
"""用户-角色关联 sys_user_role(V0.3)"""
|
||
|
||
__tablename__ = "sys_user_role"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
user_id = Column(String(64), nullable=False, comment="用户ID")
|
||
role_id = Column(String(64), nullable=False, comment="角色ID")
|
||
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 SysRoleMenu(Base):
|
||
"""角色-菜单关联 sys_role_menu(V0.3)"""
|
||
|
||
__tablename__ = "sys_role_menu"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
role_id = Column(String(64), nullable=False, comment="角色ID")
|
||
menu_id = Column(String(64), nullable=False, comment="菜单ID")
|
||
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 SysRoleDataScopeDetail(Base):
|
||
"""角色自定义数据权限明细 sys_role_data_scope_detail"""
|
||
|
||
__tablename__ = "sys_role_data_scope_detail"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
role_id = Column(String(64), nullable=False, comment="角色ID")
|
||
scope_type = Column(String(20), nullable=False, comment="范围类型:dept/user")
|
||
scope_value = Column(String(100), nullable=False, comment="范围值:部门ID/用户ID")
|
||
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 SysMenu(Base):
|
||
"""菜单表 sys_menu(V0.3)"""
|
||
|
||
__tablename__ = "sys_menu"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
menu_name = Column(String(50), nullable=False, comment="菜单名称")
|
||
parent_id = Column(String(64), nullable=False, default="0", comment="父菜单ID")
|
||
menu_type = Column(CHAR(1), nullable=True, default="M", comment="类型 M目录 C菜单 F按钮")
|
||
path = Column(String(200), nullable=False, default="", comment="路由路径")
|
||
component = Column(String(255), nullable=True, comment="组件路径")
|
||
perms = Column(String(100), nullable=True, comment="权限标识")
|
||
is_frame = Column(Integer, nullable=True, default=1, comment="是否外链")
|
||
visible = Column(CHAR(1), nullable=True, default="1", comment="显示状态")
|
||
status = Column(CHAR(1), nullable=False, default="1", 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 SysDept(Base):
|
||
"""组织/部门 sys_dept"""
|
||
|
||
__tablename__ = "sys_dept"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
parent_id = Column(String(64), nullable=False, default="0", comment="父组织id")
|
||
dept_name = Column(String(200), nullable=False, comment="组织名称")
|
||
dept_category_code = Column(String(64), nullable=True, comment="组织类别编码")
|
||
status = Column(CHAR(1), nullable=False, default="1", comment="部门状态")
|
||
leader = Column(String(100), nullable=True, comment="部门负责人")
|
||
leader_phone = Column(String(32), 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 SysTenant(Base):
|
||
"""租户表 sys_tenant(V0.3 2.1.1)"""
|
||
|
||
__tablename__ = "sys_tenant"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
tenant_no = Column(String(64), nullable=False, comment="租户编号(业务编码)")
|
||
tenant_name = Column(String(200), nullable=False, comment="租户名称")
|
||
contact_name = Column(String(100), nullable=True, comment="联系人姓名")
|
||
contact_phone = Column(String(32), nullable=True, 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="删除标记:0-正常 1-已删除")
|
||
|
||
|
||
class SysSite(Base):
|
||
"""站点 sys_site"""
|
||
|
||
__tablename__ = "sys_site"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
site_name = Column(String(200), nullable=False, comment="站点名称")
|
||
site_code = Column(String(64), nullable=False, comment="站点编码")
|
||
site_type = Column(String(64), nullable=True, comment="站点类型")
|
||
status = Column(CHAR(1), nullable=False, default="1", comment="状态")
|
||
address = Column(String(512), nullable=True, comment="详细地址")
|
||
contact_name = Column(String(100), nullable=True, comment="联系人")
|
||
contact_phone = Column(String(32), nullable=True, comment="联系电话")
|
||
business_scope = Column(String(256), 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 SysPost(Base):
|
||
"""职位 sys_post"""
|
||
|
||
__tablename__ = "sys_post"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
post_name = Column(String(100), nullable=False, comment="职位名称")
|
||
post_code = Column(String(64), nullable=False, comment="职位编码")
|
||
status = Column(CHAR(1), nullable=False, default="1", 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 SysUserPost(Base):
|
||
"""用户-职位关联 sys_user_post"""
|
||
|
||
__tablename__ = "sys_user_post"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
user_id = Column(String(64), nullable=False, comment="用户ID")
|
||
post_id = Column(String(64), nullable=False, comment="职位ID")
|
||
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 BizItemUnit(Base):
|
||
"""物品单位 biz_item_unit"""
|
||
|
||
__tablename__ = "biz_item_unit"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
unit_code = Column(String(64), nullable=False, comment="单位编码")
|
||
unit_name = Column(String(100), nullable=False, 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 BizExpressCompany(Base):
|
||
"""快递公司 biz_express_company"""
|
||
|
||
__tablename__ = "biz_express_company"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
express_code = Column(String(64), nullable=False, comment="快递公司编码")
|
||
express_name = Column(String(200), nullable=False, 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 BizCustomer(Base):
|
||
"""客户 biz_customer"""
|
||
|
||
__tablename__ = "biz_customer"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
customer_name = Column(String(100), nullable=False, comment="客户姓名")
|
||
sex = Column(CHAR(1), nullable=True, default="2", comment="性别(0男1女2未知)")
|
||
id_card_no = Column(String(32), nullable=True, comment="身份证号")
|
||
age = Column(Integer, nullable=True, comment="年龄")
|
||
phone_no = Column(String(32), nullable=True, comment="联系电话")
|
||
customer_tags = Column(String(512), 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 BizCellSampleType(Base):
|
||
"""细胞样本类型 biz_cell_sample_type"""
|
||
|
||
__tablename__ = "biz_cell_sample_type"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
type_code = Column(String(64), nullable=False, comment="样本类型编码")
|
||
type_name = Column(String(200), nullable=False, comment="样本类型名称")
|
||
storage_years = Column(Integer, nullable=True, comment="样本存储年份")
|
||
storage_price = Column(Numeric(18, 2), 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 BizCollectionRegion(Base):
|
||
"""采集地区 biz_collection_region"""
|
||
|
||
__tablename__ = "biz_collection_region"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
region_name = Column(String(200), nullable=False, 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 BizCollectionHospital(Base):
|
||
"""采集地区下属医院 biz_collection_hospital"""
|
||
|
||
__tablename__ = "biz_collection_hospital"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
region_id = Column(String(64), nullable=False, comment="采集地区ID")
|
||
hospital_name = Column(String(200), nullable=False, 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 BizCollectionProtocolNo(Base):
|
||
"""采集协议号池 biz_collection_protocol_no"""
|
||
|
||
__tablename__ = "biz_collection_protocol_no"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
protocol_no = Column(String(32), nullable=False, comment="采集协议号")
|
||
issued = Column(SmallInteger, nullable=False, default=0, comment="是否下发(1是0否)")
|
||
issued_user_id = Column(String(64), nullable=True, comment="下发用户ID")
|
||
issued_user_name = Column(String(100), nullable=True, comment="下发用户姓名(冗余)")
|
||
issued_time = Column(DateTime, 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 BizSampleCode(Base):
|
||
"""样本编码池 biz_sample_code"""
|
||
|
||
__tablename__ = "biz_sample_code"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
sample_code = Column(String(32), nullable=False, comment="样本编码")
|
||
sample_code_type = Column(String(16), nullable=True, comment="样本编码类型 zxbm造血编码 qdbm脐带编码")
|
||
issued = Column(SmallInteger, nullable=False, default=0, comment="是否下发(1是0否)")
|
||
issued_user_id = Column(String(64), nullable=True, comment="下发用户ID")
|
||
issued_user_name = Column(String(100), nullable=True, comment="下发用户姓名(冗余)")
|
||
issued_time = Column(DateTime, 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="删除标记")
|
||
|
||
|
||
# =============================================================================
|
||
# 字典管理(sys_dict_type / sys_dict_data)
|
||
# =============================================================================
|
||
|
||
|
||
class SysDictType(Base):
|
||
"""字典类型 sys_dict_type"""
|
||
|
||
__tablename__ = "sys_dict_type"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
dict_name = Column(String(100), nullable=False, default="", comment="字典名称")
|
||
dict_type = Column(String(100), nullable=False, default="", 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 SysEthnic(Base):
|
||
"""民族码表 sys_ethnic(国标 GB/T 3304,全局)"""
|
||
|
||
__tablename__ = "sys_ethnic"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
ethnic_name = Column(String(64), nullable=False, default="", comment="民族名称")
|
||
ethnic_code = Column(String(16), nullable=False, default="", comment="民族编码")
|
||
tenant_no = Column(String(64), nullable=False, default="", 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 SysDictData(Base):
|
||
"""字典数据 sys_dict_data"""
|
||
|
||
__tablename__ = "sys_dict_data"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
dict_label = Column(String(100), nullable=False, default="", comment="字典标签")
|
||
dict_value = Column(String(100), nullable=False, default="", comment="字典键值")
|
||
dict_type = Column(String(100), nullable=False, default="", 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="删除标记")
|
||
|
||
|
||
# =============================================================================
|
||
# 可选:API 请求日志(不在 V0.3 DDL 内;无表时中间件写入会失败并记录 warning)
|
||
# =============================================================================
|
||
|
||
|
||
class SysApiRequestLog(Base):
|
||
"""API 请求日志"""
|
||
|
||
__tablename__ = "sys_api_request_log"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
http_method = Column(String(10), nullable=False, comment="HTTP 方法")
|
||
path = Column(String(500), nullable=False, comment="请求路径")
|
||
query_string = Column(String(2000), nullable=True, comment="Query 字符串")
|
||
request_body = Column(Text, nullable=True, comment="请求体(截断)")
|
||
response_body = Column(Text, nullable=True, comment="响应体(截断)")
|
||
status_code = Column(Integer, nullable=False, comment="HTTP 状态码")
|
||
duration_ms = Column(Integer, nullable=False, comment="耗时(ms)")
|
||
user_id = Column(String(64), nullable=True, comment="用户ID(JWT 解析)")
|
||
username = Column(String(100), nullable=True, comment="用户名")
|
||
role = Column(String(64), nullable=True, comment="角色")
|
||
ip_address = Column(String(50), nullable=True, comment="IP地址")
|
||
user_agent = Column(String(500), nullable=True, comment="User-Agent")
|
||
is_del = Column(Integer, default=0, comment="是否删除")
|
||
create_at = Column(DateTime, default=datetime.now, comment="创建时间")
|
||
create_by = Column(String(32), nullable=True, comment="创建人ID")
|
||
create_name = Column(String(100), nullable=True, comment="创建人姓名")
|
||
update_at = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment="修改时间")
|
||
update_by = Column(String(32), nullable=True, comment="修改人ID")
|
||
|
||
|
||
class SysApiRequestLogHis(Base):
|
||
"""API 请求日志历史表"""
|
||
|
||
__tablename__ = "sys_api_request_log_his"
|
||
|
||
id = Column(String(64), primary_key=True, nullable=False, comment="主键ID")
|
||
http_method = Column(String(10), nullable=False, comment="HTTP 方法")
|
||
path = Column(String(500), nullable=False, comment="请求路径")
|
||
query_string = Column(String(2000), nullable=True, comment="Query 字符串")
|
||
request_body = Column(Text, nullable=True, comment="请求体(截断)")
|
||
response_body = Column(Text, nullable=True, comment="响应体(截断)")
|
||
status_code = Column(Integer, nullable=False, comment="HTTP 状态码")
|
||
duration_ms = Column(Integer, nullable=False, comment="耗时(ms)")
|
||
user_id = Column(String(64), nullable=True, comment="用户ID")
|
||
username = Column(String(100), nullable=True, comment="用户名")
|
||
role = Column(String(64), nullable=True, comment="角色")
|
||
ip_address = Column(String(50), nullable=True, comment="IP地址")
|
||
user_agent = Column(String(500), nullable=True, comment="User-Agent")
|
||
create_at = Column(DateTime, default=datetime.now, comment="创建时间")
|
||
create_by = Column(String(32), nullable=True, comment="创建人ID")
|
||
create_name = Column(String(100), nullable=True, comment="创建人姓名")
|
||
update_at = Column(DateTime, nullable=True, comment="修改时间")
|
||
update_by = Column(String(32), nullable=True, comment="修改人ID")
|
||
his_create_at = Column(DateTime, default=datetime.now, comment="历史记录创建时间")
|
||
|
||
|
||
# =============================================================================
|
||
# 业务表(biz_leave_request)
|
||
# =============================================================================
|
||
|
||
|
||
class BizLeaveRequest(Base):
|
||
"""请假申请 biz_leave_request"""
|
||
|
||
__tablename__ = "biz_leave_request"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
leave_type = Column(String(32), nullable=False, default="personal", comment="请假类型: personal/sick/annual/other")
|
||
start_date = Column(String(20), nullable=False, comment="开始日期")
|
||
end_date = Column(String(20), nullable=False, comment="结束日期")
|
||
days = Column(Integer, nullable=False, default=1, comment="请假天数")
|
||
reason = Column(String(500), nullable=True, comment="请假原因")
|
||
wf_instance_id = Column(String(64), nullable=True, comment="流程实例ID")
|
||
status = Column(String(32), nullable=False, default="draft", comment="状态: draft/pending/approved/rejected/cancelled")
|
||
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="删除标记:0-正常 1-已删除")
|
||
|
||
|
||
# =============================================================================
|
||
# 工作流(wf_process_def / wf_process_version / wf_node / wf_transition / wf_process_instance / wf_task)
|
||
# =============================================================================
|
||
|
||
|
||
class WfProcessDef(Base):
|
||
"""流程定义 wf_process_def"""
|
||
|
||
__tablename__ = "wf_process_def"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
process_code = Column(String(64), nullable=False, comment="流程编码")
|
||
process_name = Column(String(200), nullable=False, comment="流程名称")
|
||
status = Column(CHAR(1), nullable=False, default="1", comment="1启用 0停用")
|
||
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="删除标记:0-正常 1-已删除")
|
||
|
||
|
||
class WfProcessVersion(Base):
|
||
"""流程定义版本 wf_process_version"""
|
||
|
||
__tablename__ = "wf_process_version"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
process_def_id = Column(String(64), nullable=False, comment="流程定义ID")
|
||
version_no = Column(Integer, nullable=False, comment="版本号,递增")
|
||
graph_json = Column(Text, nullable=True, comment="节点与连线等配置(JSON 字符串)")
|
||
is_latest = Column(CHAR(1), nullable=True, default="0", comment="是否最新版本(1是 0否)")
|
||
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="删除标记:0-正常 1-已删除")
|
||
|
||
|
||
class WfNode(Base):
|
||
"""流程节点 wf_node"""
|
||
|
||
__tablename__ = "wf_node"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
process_version_id = Column(String(64), nullable=False, comment="流程版本ID")
|
||
node_key = Column(String(64), nullable=False, comment="节点唯一键(画布内)")
|
||
node_type = Column(String(32), nullable=False, comment="start/end/approval/condition 等")
|
||
node_name = Column(String(200), nullable=True, comment="节点名称")
|
||
config_json = Column(Text, nullable=True, comment="审批人/SQL/会签策略等配置")
|
||
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="删除标记:0-正常 1-已删除")
|
||
|
||
|
||
class WfTransition(Base):
|
||
"""流程连线/转移 wf_transition"""
|
||
|
||
__tablename__ = "wf_transition"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
process_version_id = Column(String(64), nullable=False, comment="流程版本ID")
|
||
from_node_key = Column(String(64), nullable=False, comment="起始节点key")
|
||
to_node_key = Column(String(64), nullable=False, comment="目标节点key")
|
||
condition_expr = Column(String(512), 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="删除标记:0-正常 1-已删除")
|
||
|
||
|
||
class WfProcessInstance(Base):
|
||
"""流程实例 wf_process_instance"""
|
||
|
||
__tablename__ = "wf_process_instance"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
process_version_id = Column(String(64), nullable=False, comment="发起时锁定的流程版本ID")
|
||
business_type = Column(String(64), nullable=True, comment="业务类型")
|
||
business_id = Column(String(64), nullable=True, comment="业务主键")
|
||
starter_user_id = Column(String(64), nullable=True, comment="发起人")
|
||
variables_json = Column(Text, nullable=True, comment="流程变量 JSON")
|
||
status = Column(String(32), nullable=True, comment="running/completed/rejected 等")
|
||
callback_url = Column(String(512), 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="删除标记:0-正常 1-已删除")
|
||
|
||
|
||
class WfTask(Base):
|
||
"""流程任务/待办 wf_task"""
|
||
|
||
__tablename__ = "wf_task"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
instance_id = Column(String(64), nullable=False, comment="流程实例ID")
|
||
node_key = Column(String(64), nullable=True, comment="当前节点key")
|
||
assignee_user_id = Column(String(64), nullable=True, comment="待办人")
|
||
status = Column(String(32), nullable=True, comment="pending/approved/rejected 等")
|
||
comment_text = Column(String(512), 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="删除标记:0-正常 1-已删除")
|
||
|
||
|
||
# =============================================================================
|
||
# 细胞存储 — 采集协议单(biz_collection_protocol / audit / payment)
|
||
# =============================================================================
|
||
|
||
|
||
class BizCollectionProtocol(Base):
|
||
"""采集协议单 biz_collection_protocol"""
|
||
|
||
__tablename__ = "biz_collection_protocol"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
protocol_no_id = Column(String(64), nullable=True, comment="采集协议号表ID")
|
||
protocol_no = Column(String(32), nullable=False, comment="采集协议号展示")
|
||
protocol_status = Column(String(16), nullable=False, default="dsx", comment="协议状态")
|
||
protocol_attachments = Column(String(4000), nullable=True, comment="协议附件")
|
||
register_date = Column(CHAR(8), nullable=True, comment="登记日期YYYYMMDD")
|
||
effective_time = Column(DateTime, nullable=True, comment="协议生效时间")
|
||
effective_desc = Column(String(512), nullable=True, comment="协议生效描述")
|
||
expire_time = Column(DateTime, nullable=True, comment="协议过期时间")
|
||
expire_desc = Column(String(512), nullable=True, comment="协议过期描述")
|
||
void_time = Column(DateTime, nullable=True, comment="协议作废时间")
|
||
void_desc = Column(String(512), nullable=True, comment="协议作废描述")
|
||
to_research_time = Column(DateTime, nullable=True, comment="协议转科研时间")
|
||
to_research_desc = Column(String(512), nullable=True, comment="协议转科研描述")
|
||
collector_user_id = Column(String(64), nullable=True, comment="采集专员用户ID")
|
||
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 BizProtocolAudit(Base):
|
||
"""采集协议单-审核记录 biz_protocol_audit"""
|
||
|
||
__tablename__ = "biz_protocol_audit"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
collection_protocol_id = Column(String(64), nullable=False, comment="采集协议单ID")
|
||
auditor_user_id = Column(String(64), nullable=True, comment="审核人")
|
||
audit_remark = Column(String(1000), nullable=True, comment="审核备注")
|
||
audit_status = Column(String(16), nullable=False, comment="审核状态 shtg/shth")
|
||
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 BizStorageReleaseReview(Base):
|
||
"""入库放行审核 biz_storage_release_review"""
|
||
|
||
__tablename__ = "biz_storage_release_review"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
sample_code = Column(String(64), nullable=False, comment="样本编码")
|
||
reception_source = Column(String(32), nullable=False, comment="来源类型 cell_storage细胞存储 research_donation科研捐赠")
|
||
protocol_id = Column(String(64), nullable=True, comment="协议单ID")
|
||
reception_id = Column(String(64), nullable=True, comment="接收记录ID")
|
||
protocol_no = Column(String(64), nullable=True, comment="协议编号快照")
|
||
sample_name = Column(String(128), nullable=True, comment="样本名称")
|
||
review_conclusion = Column(String(16), nullable=True, comment="审核结论 tg通过 btg不通过")
|
||
review_remark = Column(String(512), nullable=True, comment="审核备注")
|
||
review_attachments = Column(String(4000), nullable=True, comment="审核附件(逗号分隔URL)")
|
||
review_by = Column(String(64), nullable=True, comment="审核人ID")
|
||
review_by_name = Column(String(64), nullable=True, comment="审核人姓名")
|
||
review_time = Column(DateTime, nullable=True, comment="审核时间")
|
||
storage_status = Column(String(16), nullable=False, default="drk", comment="入库状态 drk待入库 yrk已入库")
|
||
storage_by = Column(String(64), nullable=True, comment="入库操作人ID")
|
||
storage_by_name = Column(String(64), nullable=True, comment="入库操作人姓名")
|
||
storage_time = Column(DateTime, nullable=True, comment="入库时间")
|
||
tenant_no = Column(String(64), nullable=False, default="", 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 BizProtocolPayment(Base):
|
||
"""采集协议单-缴费主表 biz_protocol_payment"""
|
||
|
||
__tablename__ = "biz_protocol_payment"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
collection_protocol_id = Column(String(64), nullable=False, comment="采集协议单ID")
|
||
pay_mode = Column(String(8), nullable=False, comment="dj趸交 fq分期")
|
||
contract_amount = Column(Numeric(18, 2), nullable=True, comment="合同金额")
|
||
installment_count = Column(Integer, nullable=True, comment="分期期数")
|
||
installment_interval_months = Column(Integer, nullable=True, comment="每期间隔(月)")
|
||
lump_sum_deadline = Column(CHAR(8), nullable=True, comment="趸交截止时间YYYYMMDD")
|
||
installment_start_date = Column(CHAR(8), nullable=True, comment="分期开始YYYYMMDD")
|
||
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 BizProtocolPaymentDetail(Base):
|
||
"""采集协议单-缴费明细 biz_protocol_payment_detail"""
|
||
|
||
__tablename__ = "biz_protocol_payment_detail"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
payment_id = Column(String(64), nullable=False, comment="缴费主表ID")
|
||
transfer_type = Column(String(16), nullable=True, comment="转账方式")
|
||
due_amount = Column(Numeric(18, 2), nullable=True, comment="应缴费金额")
|
||
transfer_amount = Column(Numeric(18, 2), nullable=True, comment="转账金额")
|
||
transfer_time = Column(DateTime, nullable=True, comment="转账时间")
|
||
transfer_attachments = Column(Text, nullable=True, comment="转账附件")
|
||
finance_confirm_attachments = Column(Text, nullable=True, comment="缴费财务确认附件")
|
||
finance_remark = Column(String(512), nullable=True, comment="缴费财务确认备注")
|
||
refund_finance_confirm_attachments = Column(Text, nullable=True, comment="财务退费确认附件")
|
||
refund_finance_remark = Column(String(512), nullable=True, comment="财务退费确认备注")
|
||
pay_status = Column(String(32), nullable=False, default="dfj", comment="缴费状态")
|
||
installment_no = Column(Integer, nullable=True, comment="分期期序号")
|
||
installment_due_date = Column(CHAR(8), nullable=True, comment="分期应缴日期YYYYMMDD")
|
||
refund_amount = Column(Numeric(18, 2), nullable=True, comment="退费金额")
|
||
refund_remark = Column(String(512), nullable=True, comment="退费备注")
|
||
refund_attachments = Column(Text, 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 BizProtocolPartyCustomer(Base):
|
||
"""采集协议单-当事人客户信息 biz_protocol_party_customer"""
|
||
|
||
__tablename__ = "biz_protocol_party_customer"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
collection_protocol_id = Column(String(64), nullable=False, comment="采集协议单ID")
|
||
customer_id = Column(String(64), nullable=True, comment="客户ID")
|
||
mother_name = Column(String(100), nullable=True, comment="母亲姓名")
|
||
mother_phone = Column(String(32), nullable=True, comment="母亲电话")
|
||
mother_id_card = Column(String(32), nullable=True, comment="母亲身份证号")
|
||
mother_birth_ym = Column(CHAR(6), nullable=True, comment="母亲出生年月YYYYMM")
|
||
mother_ethnic = Column(String(32), nullable=True, comment="母亲民族")
|
||
mother_address = Column(String(512), nullable=True, comment="母亲地址")
|
||
father_name = Column(String(100), nullable=True, comment="父亲姓名")
|
||
father_phone = Column(String(32), nullable=True, comment="父亲电话")
|
||
father_id_card = Column(String(32), nullable=True, comment="父亲身份证号")
|
||
newborn_name = Column(String(100), nullable=True, comment="新生儿姓名")
|
||
newborn_id_card = Column(String(32), nullable=True, comment="新生儿身份证号")
|
||
newborn_delivery_time = Column(DateTime, nullable=True, comment="新生儿分娩时间")
|
||
newborn_sex = Column(CHAR(1), nullable=True, comment="新生儿性别")
|
||
delivery_mode = Column(String(16), nullable=True, comment="分娩方式")
|
||
birth_order = Column(Integer, nullable=True, comment="出生顺序")
|
||
newborn_weight_gram = Column(Integer, nullable=True, comment="新生儿体重(克)")
|
||
apgar_1min = Column(Numeric(4, 1), nullable=True, comment="Apgar 1分钟评分")
|
||
apgar_5min = Column(Numeric(4, 1), nullable=True, comment="Apgar 5分钟评分")
|
||
collector_user_id = Column(String(64), nullable=True, comment="采集专员用户ID")
|
||
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 BizProtocolCollectionInfo(Base):
|
||
"""采集协议单-采集信息 biz_protocol_collection_info"""
|
||
|
||
__tablename__ = "biz_protocol_collection_info"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
collection_protocol_id = Column(String(64), nullable=False, comment="采集协议单ID")
|
||
region_id = Column(String(64), nullable=True, comment="区域ID")
|
||
hospital_id = Column(String(64), nullable=True, comment="医院ID")
|
||
medical_staff = Column(String(200), nullable=True, comment="医护人员")
|
||
sales_user_id = Column(String(64), nullable=True, comment="销售人员用户ID")
|
||
sample_collect_time = Column(DateTime, nullable=True, comment="样本采集时间")
|
||
maternal_blood_collect_time = Column(DateTime, 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 BizProtocolSample(Base):
|
||
"""采集协议单-样本信息 biz_protocol_sample"""
|
||
|
||
__tablename__ = "biz_protocol_sample"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
collection_protocol_id = Column(String(64), nullable=False, comment="采集协议单ID")
|
||
sample_type_id = Column(String(64), nullable=True, comment="样本类型ID")
|
||
sample_code_id = Column(String(64), nullable=True, comment="样本编码ID")
|
||
sample_code = Column(String(32), nullable=True, comment="样本编码")
|
||
collect_amount = Column(Numeric(18, 4), nullable=True, comment="采集量")
|
||
unit_id = Column(String(64), nullable=True, comment="单位ID")
|
||
price = Column(Numeric(18, 2), nullable=True, comment="价格")
|
||
storage_years = Column(Integer, nullable=True, comment="存储年限")
|
||
sample_status = Column(String(16), nullable=True, comment="样本状态")
|
||
storage_in_date = Column(CHAR(8), nullable=True, comment="入库日期YYYYMMDD")
|
||
detect_start_date = Column(CHAR(8), nullable=True, comment="检测开始日期YYYYMMDD")
|
||
void_date = Column(CHAR(8), nullable=True, comment="作废日期YYYYMMDD")
|
||
storage_expire_date = Column(CHAR(8), nullable=True, comment="存储到期日期YYYYMMDD")
|
||
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 BizProtocolSampleTransport(Base):
|
||
"""采集协议单-样本运输 biz_protocol_sample_transport"""
|
||
|
||
__tablename__ = "biz_protocol_sample_transport"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
collection_protocol_id = Column(String(64), nullable=False, comment="采集协议单ID")
|
||
sample_id = Column(String(64), nullable=False, comment="样本ID")
|
||
sample_code = Column(String(32), nullable=True, comment="样本编码快照")
|
||
transport_type = Column(String(16), nullable=False, comment="kdys快递运输 ryxd人员携带")
|
||
express_company_id = Column(String(64), nullable=True, comment="快递公司ID")
|
||
waybill_no = Column(String(128), nullable=True, comment="快递单号")
|
||
dest_site_id = Column(String(64), nullable=True, comment="目的站点ID")
|
||
express_fee = Column(Numeric(18, 2), nullable=True, comment="快递费用(元)")
|
||
eta_time = Column(DateTime, nullable=True, comment="预计到达时间")
|
||
carrier_name = Column(String(100), nullable=True, comment="携带人员姓名")
|
||
carrier_phone = Column(String(32), 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 BizAttachment(Base):
|
||
"""业务附件 biz_attachment"""
|
||
|
||
__tablename__ = "biz_attachment"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
business_type = Column(String(50), nullable=True, comment="业务类型")
|
||
business_id = Column(String(64), nullable=True, comment="业务主键ID")
|
||
original_name = Column(String(200), nullable=False, comment="原始文件名")
|
||
file_ext = Column(String(20), nullable=True, comment="文件后缀名")
|
||
file_url = Column(String(500), nullable=False, comment="MinIO路径后缀")
|
||
file_size = Column(Integer, nullable=True, comment="文件大小(字节)")
|
||
file_type = Column(String(50), nullable=True, comment="MIME类型")
|
||
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 BizProtocolStorageCert(Base):
|
||
"""采集协议单-储存证书 biz_protocol_storage_cert"""
|
||
|
||
__tablename__ = "biz_protocol_storage_cert"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
collection_protocol_id = Column(String(64), nullable=False, comment="采集协议单ID")
|
||
make_status = Column(CHAR(1), nullable=True, default="0", comment="制作状态 0-未制作 1-已制作")
|
||
cert_image_urls = Column(String(4000), nullable=True, comment="证书图片URLs")
|
||
make_date = Column(CHAR(8), nullable=True, comment="制作日期YYYYMMDD")
|
||
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 BizSampleReceptionCheckItem(Base):
|
||
"""样本接收检查项配置 biz_sample_reception_check_item"""
|
||
|
||
__tablename__ = "biz_sample_reception_check_item"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
item_code = Column(String(64), nullable=False, comment="检查项编码")
|
||
item_name = Column(String(200), nullable=False, comment="检查项名称")
|
||
status = Column(String(1), nullable=False, default="1", comment="1启用 0停用")
|
||
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 BizSampleReceptionCheckResult(Base):
|
||
"""样本接收检查项结果 biz_sample_reception_check_result"""
|
||
|
||
__tablename__ = "biz_sample_reception_check_result"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
reception_id = Column(String(64), nullable=False, comment="接收记录ID")
|
||
check_item_id = Column(String(64), nullable=False, comment="检查项配置ID")
|
||
item_code = Column(String(64), nullable=False, comment="检查项编码快照")
|
||
item_name = Column(String(200), nullable=False, comment="检查项名称快照")
|
||
checked = Column(SmallInteger, nullable=False, default=0, 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 BizSampleReception(Base):
|
||
"""样本接收 biz_sample_reception"""
|
||
|
||
__tablename__ = "biz_sample_reception"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
protocol_sample_id = Column(String(64), nullable=False, comment="协议样本ID")
|
||
collection_protocol_id = Column(String(64), nullable=False, comment="采集协议单ID")
|
||
reception_time = Column(DateTime, nullable=False, comment="样本接收时间")
|
||
handler_user_id = Column(String(64), nullable=True, comment="经手人用户ID")
|
||
handler_name = Column(String(100), nullable=True, comment="经手人姓名")
|
||
receive_temperature = Column(String(32), nullable=True, comment="接收温度")
|
||
volume_ml = Column(Numeric(18, 4), nullable=True, comment="体积(ml)")
|
||
net_weight_g = Column(Numeric(18, 4), nullable=True, comment="净重(g)")
|
||
check_packaging = Column(SmallInteger, nullable=False, default=0, comment="包装检查")
|
||
check_sealing = Column(SmallInteger, nullable=False, default=0, comment="封口检查")
|
||
check_no_damage = Column(SmallInteger, nullable=False, default=0, comment="无破损")
|
||
check_no_leakage = Column(SmallInteger, nullable=False, default=0, comment="无漏液")
|
||
check_color = Column(SmallInteger, nullable=False, default=0, comment="颜色")
|
||
check_tying_rope = Column(SmallInteger, nullable=False, default=0, comment="系绳")
|
||
check_no_stratification = Column(SmallInteger, nullable=False, default=0, comment="无分层")
|
||
accept_conclusion = Column(String(16), nullable=False, comment="结论 js接收 bj拒收")
|
||
receive_attachments = Column(String(4000), nullable=True, comment="接收附件")
|
||
reception_source = Column(String(20), nullable=False, default="cell_storage", comment="来源类型 cell_storage细胞存储 research_donation科研捐赠")
|
||
donation_sample_id = Column(String(64), nullable=True, comment="捐赠样本ID(仅科研捐赠)")
|
||
research_donation_id = Column(String(64), nullable=True, comment="科研捐赠单ID(仅科研捐赠)")
|
||
sample_code = Column(String(32), 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 BizSampleSmsNotification(Base):
|
||
__tablename__ = "biz_sample_sms_notification"
|
||
|
||
id = Column(String(64), primary_key=True)
|
||
sample_reception_id = Column(String(64), nullable=False, comment="关联 biz_sample_reception.id")
|
||
protocol_id = Column(String(64), comment="关联采集协议单ID")
|
||
sms_content = Column(String(500), comment="提取的短信内容")
|
||
sms_notified = Column(SmallInteger, default=0, comment="0=未通知 1=已通知")
|
||
notified_by = Column(String(64), comment="通知操作人ID")
|
||
notified_time = Column(DateTime, comment="通知时间")
|
||
tenant_no = Column(String(32))
|
||
order_num = Column(Integer, default=0)
|
||
remark = Column(String(500))
|
||
create_by = Column(String(64))
|
||
create_dept_id = Column(String(64))
|
||
create_time = Column(DateTime, default=datetime.now)
|
||
update_by = Column(String(64))
|
||
update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now)
|
||
del_flag = Column(String(1), default="0")
|
||
|
||
|
||
class BizStorageEntrySmsNotification(Base):
|
||
"""样本入库短信通知 biz_storage_entry_sms_notification"""
|
||
|
||
__tablename__ = "biz_storage_entry_sms_notification"
|
||
|
||
id = Column(String(64), primary_key=True)
|
||
storage_review_id = Column(String(64), nullable=False, comment="关联 biz_storage_release_review.id")
|
||
protocol_id = Column(String(64), comment="关联采集协议单ID")
|
||
sms_content = Column(String(500), comment="生成的短信内容")
|
||
sms_notified = Column(SmallInteger, default=0, comment="0=未通知 1=已通知")
|
||
notified_by = Column(String(64), comment="通知操作人ID")
|
||
notified_by_name = Column(String(64), comment="通知操作人姓名")
|
||
notified_time = Column(DateTime, comment="通知时间")
|
||
tenant_no = Column(String(32))
|
||
order_num = Column(Integer, default=0)
|
||
remark = Column(String(500))
|
||
create_by = Column(String(64))
|
||
create_dept_id = Column(String(64))
|
||
create_time = Column(DateTime, default=datetime.now)
|
||
update_by = Column(String(64))
|
||
update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now)
|
||
del_flag = Column(String(1), default="0")
|
||
|
||
|
||
# =============================================================================
|
||
# 质量检测 — 第三方/实验室主数据、质检工单、质检任务
|
||
# =============================================================================
|
||
|
||
|
||
class BizQcThirdPartyCompany(Base):
|
||
"""第三方检测公司 biz_qc_third_party_company"""
|
||
|
||
__tablename__ = "biz_qc_third_party_company"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
company_code = Column(String(64), nullable=False, comment="公司编码")
|
||
company_name = Column(String(200), nullable=False, comment="公司名称")
|
||
contact_name = Column(String(100), nullable=True, comment="联系人")
|
||
contact_phone = Column(String(32), nullable=True, comment="联系电话")
|
||
address = Column(String(500), nullable=True, comment="地址")
|
||
invoice_title = Column(String(200), nullable=True, comment="发票抬头")
|
||
tax_id = Column(String(64), nullable=True, comment="纳税人识别号")
|
||
bank_name = Column(String(200), nullable=True, comment="开户银行")
|
||
bank_account = Column(String(64), nullable=True, comment="银行账号")
|
||
status = Column(String(1), nullable=False, default="1", comment="1启用 0停用")
|
||
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 BizQcThirdPartyItem(Base):
|
||
"""第三方检测项目 biz_qc_third_party_item"""
|
||
|
||
__tablename__ = "biz_qc_third_party_item"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
company_id = Column(String(64), nullable=False, comment="第三方公司ID")
|
||
item_code = Column(String(64), nullable=False, comment="项目编码")
|
||
item_name = Column(String(200), nullable=False, comment="项目名称")
|
||
fee_amount = Column(Numeric(18, 2), nullable=False, default=0, comment="费用元")
|
||
status = Column(String(1), nullable=False, default="1", comment="1启用 0停用")
|
||
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 BizQcLabTestItem(Base):
|
||
"""实验室自检项目 biz_qc_lab_test_item"""
|
||
|
||
__tablename__ = "biz_qc_lab_test_item"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
item_code = Column(String(64), nullable=False, comment="项目编码")
|
||
item_name = Column(String(200), nullable=False, comment="项目名称")
|
||
description = Column(String(500), nullable=True, comment="描述")
|
||
status = Column(String(1), nullable=False, default="1", comment="1启用 0停用")
|
||
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 BizQcWorkOrder(Base):
|
||
"""质检工单 biz_qc_work_order"""
|
||
|
||
__tablename__ = "biz_qc_work_order"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
work_order_no = Column(String(32), nullable=False, comment="工单号")
|
||
work_order_type = Column(String(20), nullable=False, default="inbound", comment="工单类型: inbound=入库, temporary=临时")
|
||
reception_id = Column(String(64), nullable=True, comment="接收记录ID")
|
||
protocol_sample_id = Column(String(64), nullable=True, comment="协议样本ID")
|
||
collection_protocol_id = Column(String(64), nullable=True, comment="协议单ID")
|
||
protocol_no = Column(String(64), nullable=True, comment="协议号快照")
|
||
sample_code = Column(String(32), nullable=True, comment="样本编码快照")
|
||
reception_source = Column(String(20), nullable=True, default="cell_storage", comment="来源类型 cell_storage/research_donation")
|
||
qc_biz_type = Column(
|
||
String(20),
|
||
nullable=False,
|
||
default="inbound",
|
||
comment="质检业务类型 inbound入库质检 outbound出库质检 temporary临时质检",
|
||
)
|
||
cell_product_id = Column(String(64), nullable=True, comment="质检对象-细胞产品ID")
|
||
work_order_status = Column(String(16), nullable=False, default="dpz", comment="工单状态")
|
||
has_lab = Column(String(1), nullable=False, default="0", comment="含实验室自检")
|
||
has_third_party = Column(String(1), nullable=False, default="0", comment="含第三方检测")
|
||
configured_time = Column(DateTime, nullable=True, comment="配置时间")
|
||
configured_by = Column(String(64), nullable=True, comment="配置人")
|
||
third_party_fee_total = Column(Numeric(18, 2), 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 BizQcWorkOrderLabItem(Base):
|
||
"""质检工单-实验室项目明细 biz_qc_work_order_lab_item"""
|
||
|
||
__tablename__ = "biz_qc_work_order_lab_item"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
work_order_id = Column(String(64), nullable=False, comment="工单ID")
|
||
order_source = Column(String(20), nullable=False, default="inbound", comment="工单来源: inbound=入库, temporary=临时")
|
||
lab_test_item_id = Column(String(64), nullable=False, comment="实验室项目ID")
|
||
item_code = Column(String(64), nullable=False, comment="项目编码快照")
|
||
item_name = Column(String(200), nullable=False, 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 BizQcWorkOrderThirdItem(Base):
|
||
"""质检工单-第三方项目明细 biz_qc_work_order_third_item"""
|
||
|
||
__tablename__ = "biz_qc_work_order_third_item"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
work_order_id = Column(String(64), nullable=False, comment="工单ID")
|
||
order_source = Column(String(20), nullable=False, default="inbound", comment="工单来源: inbound=入库, temporary=临时")
|
||
third_party_item_id = Column(String(64), nullable=False, comment="第三方项目ID")
|
||
company_id = Column(String(64), nullable=False, comment="公司ID")
|
||
company_name = Column(String(200), nullable=False, comment="公司名快照")
|
||
item_code = Column(String(64), nullable=False, comment="项目编码快照")
|
||
item_name = Column(String(200), nullable=False, comment="项目名称快照")
|
||
fee_amount = Column(Numeric(18, 2), nullable=False, default=0, 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 BizQcTask(Base):
|
||
"""质检任务 biz_qc_task"""
|
||
|
||
__tablename__ = "biz_qc_task"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
work_order_id = Column(String(64), nullable=False, comment="工单ID")
|
||
order_source = Column(String(20), nullable=False, default="inbound", comment="工单来源: inbound=入库, temporary=临时")
|
||
task_no = Column(String(32), nullable=False, comment="任务号")
|
||
task_type = Column(String(16), nullable=False, comment="sysz实验室 dsfjc第三方")
|
||
source_line_id = Column(String(64), nullable=False, comment="工单明细行ID")
|
||
sample_code = Column(String(32), nullable=True, comment="样本编码快照")
|
||
item_code = Column(String(64), nullable=False, comment="项目编码快照")
|
||
item_name = Column(String(200), nullable=False, comment="项目名称快照")
|
||
company_id = Column(String(64), nullable=True, comment="第三方公司ID")
|
||
company_name = Column(String(200), nullable=True, comment="第三方公司名")
|
||
fee_amount = Column(Numeric(18, 2), nullable=True, comment="费用快照")
|
||
task_status = Column(String(16), nullable=False, default="dzx", comment="任务状态")
|
||
conclusion = Column(String(16), nullable=True, comment="检测结论 tg通过 btg不通过")
|
||
third_party_attachments = Column(String(4000), nullable=True, comment="第三方材料")
|
||
completed_time = Column(DateTime, nullable=True, comment="完成时间")
|
||
completed_by = Column(String(64), 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="删除标记")
|
||
|
||
|
||
# =============================================================================
|
||
# V0.4 运营支撑(2.4 洁净室管理 / 库位管理 / 展馆预约)
|
||
# =============================================================================
|
||
|
||
|
||
class BizCleanRoom(Base):
|
||
"""洁净室 biz_clean_room"""
|
||
|
||
__tablename__ = "biz_clean_room"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
room_code = Column(String(64), nullable=False, comment="编号")
|
||
room_name = Column(String(200), nullable=False, comment="名称")
|
||
room_grade = Column(String(8), nullable=True, comment="等级 A/B/C/D")
|
||
room_status = Column(String(16), nullable=False, default="zc", comment="zc正常 yc异常")
|
||
area_sqm = Column(Numeric(12, 2), nullable=True, comment="面积m²")
|
||
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 BizCleanRoomAccessLog(Base):
|
||
"""洁净室出入记录 biz_clean_room_access_log"""
|
||
|
||
__tablename__ = "biz_clean_room_access_log"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
clean_room_id = Column(String(64), nullable=False, comment="洁净室ID")
|
||
user_id = Column(String(64), nullable=True, comment="人员用户ID")
|
||
person_name = Column(String(100), nullable=True, comment="人员姓名(冗余)")
|
||
dept_name = Column(String(200), nullable=True, comment="部门")
|
||
enter_time = Column(DateTime, nullable=False, comment="进入时间")
|
||
purpose = Column(String(512), nullable=True, comment="目的")
|
||
leave_time = Column(DateTime, nullable=True, comment="离开时间")
|
||
body_temp = Column(String(32), 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 BizStorageFacility(Base):
|
||
"""存储设施树 biz_storage_facility"""
|
||
|
||
__tablename__ = "biz_storage_facility"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
parent_id = Column(String(64), nullable=False, default="0", comment="父节点ID,0根")
|
||
node_name = Column(String(200), nullable=False, comment="节点名称(罐/层/盒等)")
|
||
node_type = Column(String(32), nullable=True, comment="facility/layer/box 等扩展")
|
||
is_leaf = Column(SmallInteger, nullable=False, default=0, comment="是否叶子存储位 1是")
|
||
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 BizStorageFacilitySlot(Base):
|
||
"""存储设施小格 biz_storage_facility_slot"""
|
||
|
||
__tablename__ = "biz_storage_facility_slot"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
facility_node_id = Column(String(64), nullable=False, comment="设施树叶子节点ID")
|
||
slot_code = Column(String(64), nullable=True, comment="小格编码/坐标")
|
||
slot_status = Column(String(16), 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="删除标记")
|
||
occupied_count = Column(Integer, nullable=True, default=0, comment="当前占用数量")
|
||
last_item_type = Column(String(32), nullable=True, comment="最近存储物品类型")
|
||
last_stored_at = Column(DateTime, nullable=True, comment="最近入库时间")
|
||
|
||
|
||
class BizStorageSlotOccupancy(Base):
|
||
"""库位占用记录 biz_storage_slot_occupancy"""
|
||
|
||
__tablename__ = "biz_storage_slot_occupancy"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
slot_id = Column(String(64), nullable=False, comment="储物格ID")
|
||
item_type = Column(String(32), nullable=False, comment="物品类型: cell_product/other")
|
||
item_id = Column(String(64), nullable=False, comment="物品ID")
|
||
item_code = Column(String(64), nullable=True, comment="物品编码(冗余)")
|
||
item_name = Column(String(200), nullable=True, comment="物品名称(冗余)")
|
||
item_source = Column(String(32), nullable=True, comment="来源: production/manual/transfer")
|
||
stored_at = Column(DateTime, nullable=True, comment="入库时间")
|
||
removed_at = Column(DateTime, nullable=True, comment="出库时间")
|
||
occupancy_status = Column(String(16), nullable=False, default="stored", comment="stored=在库/removed=已出库")
|
||
tenant_no = Column(String(64), nullable=False, default="zkxw", comment="租户编号")
|
||
order_num = Column(Integer, nullable=True, comment="排序号")
|
||
remark = Column(String(500), 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 BizExhibitionAppointment(Base):
|
||
"""展馆预约 biz_exhibition_appointment"""
|
||
|
||
__tablename__ = "biz_exhibition_appointment"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
appointment_no = Column(String(64), nullable=False, comment="预约编号")
|
||
visit_org = Column(String(200), nullable=True, comment="来访单位")
|
||
contact_name = Column(String(100), nullable=True, comment="联系人")
|
||
visit_date = Column(DateTime, nullable=True, comment="到访日期")
|
||
visitor_count = Column(Integer, nullable=True, comment="人数")
|
||
reception_user_id = Column(String(64), nullable=True, comment="接待人员用户ID")
|
||
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="删除标记")
|
||
|
||
|
||
# =============================================================================
|
||
# V0.3 中试服务管理(2.3.1 ~ 2.3.6)
|
||
# =============================================================================
|
||
|
||
|
||
class BizCellProductType(Base):
|
||
"""细胞产品类型 biz_cell_product_type"""
|
||
|
||
__tablename__ = "biz_cell_product_type"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
product_type_code = Column(String(64), nullable=False, comment="细胞产品类型编码")
|
||
product_type_name = Column(String(200), nullable=False, 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 BizCellProductSpec(Base):
|
||
"""细胞产品规格 biz_cell_product_spec"""
|
||
|
||
__tablename__ = "biz_cell_product_spec"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
spec_code = Column(String(64), nullable=False, comment="规格编码")
|
||
spec_name = Column(String(200), nullable=False, 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 BizCellProductPrice(Base):
|
||
"""细胞产品价格体系 biz_cell_product_price"""
|
||
|
||
__tablename__ = "biz_cell_product_price"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
project_name = Column(String(200), nullable=False, comment="项目名称")
|
||
project_code = Column(String(64), nullable=False, comment="项目编码")
|
||
cell_type_code = Column(String(64), nullable=True, comment="细胞类型编码")
|
||
cell_type_name = Column(String(200), nullable=True, comment="细胞类型名称")
|
||
spec_text = Column(String(200), nullable=True, comment="规格(展示或关联规格编码)")
|
||
spec_id = Column(String(64), nullable=True, comment="规格ID")
|
||
cell_product_type_id = Column(String(64), nullable=True, comment="细胞产品类型ID")
|
||
unit_price = Column(Numeric(18, 2), 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 BizCellProductProjectSystem(Base):
|
||
"""细胞产品项目价格体系 biz_cell_product_project_system"""
|
||
|
||
__tablename__ = "biz_cell_product_project_system"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
system_name = Column(String(200), nullable=False, comment="体系名称")
|
||
system_code = Column(String(64), nullable=False, comment="体系编码")
|
||
status = Column(CHAR(1), nullable=False, default="1", comment="1正常 0停用")
|
||
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 BizCellProductProjectSystemItem(Base):
|
||
"""项目价格体系-细胞价格明细 biz_cell_product_project_system_item"""
|
||
|
||
__tablename__ = "biz_cell_product_project_system_item"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
project_system_id = Column(String(64), nullable=False, comment="项目价格体系ID")
|
||
source_price_id = Column(String(64), nullable=True, comment="来源细胞产品价格体系行ID")
|
||
project_name = Column(String(200), nullable=True, comment="项目名称")
|
||
project_code = Column(String(64), nullable=True, comment="项目编码")
|
||
cell_type_code = Column(String(64), nullable=True, comment="细胞类型编码")
|
||
cell_type_name = Column(String(200), nullable=True, comment="细胞类型名称")
|
||
spec_text = Column(String(200), nullable=True, comment="规格")
|
||
spec_id = Column(String(64), nullable=True, comment="规格ID")
|
||
cell_product_type_id = Column(String(64), nullable=True, comment="细胞产品类型ID")
|
||
unit_price = Column(Numeric(18, 2), 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 BizChannel(Base):
|
||
"""渠道信息 biz_channel"""
|
||
|
||
__tablename__ = "biz_channel"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
channel_name = Column(String(200), nullable=False, comment="渠道名称")
|
||
credit_code = Column(String(64), nullable=True, comment="统一社会信用代码")
|
||
channel_type = Column(String(16), nullable=True, comment="yy医院 hzjg合作机构 zs诊所 zfjg政府机构 qt其他")
|
||
contact_name = Column(String(100), nullable=True, comment="联系人姓名")
|
||
contact_phone = Column(String(32), nullable=True, comment="联系电话")
|
||
contact_email = Column(String(128), nullable=True, comment="联系邮箱")
|
||
protocol_attachments = Column(String(4000), 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 BizChannelAgreement(Base):
|
||
"""渠道协议 biz_channel_agreement"""
|
||
|
||
__tablename__ = "biz_channel_agreement"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
channel_id = Column(String(64), nullable=False, comment="渠道ID")
|
||
agreement_type = Column(String(16), nullable=False, comment="kyxy科研 zsxy中试 lcxy临床")
|
||
business_type = Column(String(32), nullable=True, comment="kyyy科研应用/中试应用/临床应用(随协议类型)")
|
||
settle_mode = Column(String(16), nullable=True, comment="yj月结 jj季结 nj年结 dcjs单次结算")
|
||
credit_limit_amount = Column(Numeric(18, 2), nullable=True, comment="授信额度(元)")
|
||
effective_date = Column(CHAR(8), nullable=True, comment="生效日期YYYYMMDD")
|
||
expire_date = Column(CHAR(8), nullable=True, comment="到期日期YYYYMMDD")
|
||
agreement_status = Column(String(16), nullable=False, default="dsx", comment="dsx待生效 sxz生效中 yzf已作废")
|
||
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 BizChannelAgreementProductPrice(Base):
|
||
"""渠道协议-细胞产品价格 biz_channel_agreement_product_price"""
|
||
|
||
__tablename__ = "biz_channel_agreement_product_price"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
channel_agreement_id = Column(String(64), nullable=False, comment="渠道协议ID")
|
||
project_name = Column(String(200), nullable=True, comment="项目名称")
|
||
project_code = Column(String(64), nullable=True, comment="项目编码")
|
||
cell_type_code = Column(String(64), nullable=True, comment="细胞类型编码")
|
||
cell_type_name = Column(String(200), nullable=True, comment="细胞类型名称")
|
||
spec_text = Column(String(200), nullable=True, comment="规格")
|
||
original_price = Column(Numeric(18, 2), nullable=True, comment="原价(元)")
|
||
agreement_price = Column(Numeric(18, 2), 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 BizChannelInvoice(Base):
|
||
"""渠道开票信息 biz_channel_invoice"""
|
||
|
||
__tablename__ = "biz_channel_invoice"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
channel_id = Column(String(64), nullable=False, comment="渠道ID")
|
||
company_name = Column(String(200), nullable=False, comment="单位名称")
|
||
tax_no = Column(String(64), nullable=True, comment="税号")
|
||
company_address = Column(String(512), nullable=True, comment="单位地址")
|
||
company_phone = Column(String(64), nullable=True, comment="电话")
|
||
bank_name = Column(String(200), nullable=True, comment="开户银行")
|
||
bank_account = Column(String(64), 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 BizChannelMailAddress(Base):
|
||
"""渠道邮寄地址 biz_channel_mail_address"""
|
||
|
||
__tablename__ = "biz_channel_mail_address"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
channel_id = Column(String(64), nullable=False, comment="渠道ID")
|
||
mail_address = Column(String(512), nullable=False, comment="邮寄地址")
|
||
mail_contact = Column(String(100), nullable=True, comment="邮寄联系人")
|
||
mail_phone = Column(String(32), 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 BizCheckupInstitution(Base):
|
||
"""体检机构 biz_checkup_institution"""
|
||
|
||
__tablename__ = "biz_checkup_institution"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
institution_name = Column(String(200), nullable=False, comment="体检机构名称")
|
||
institution_address = Column(String(512), nullable=True, comment="体检机构地址")
|
||
contact_name = Column(String(100), nullable=True, comment="联系人")
|
||
contact_phone = Column(String(32), nullable=True, comment="联系人电话")
|
||
status = Column(CHAR(1), nullable=False, default="1", comment="1正常 0停用")
|
||
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 BizCheckupInstitutionInvoice(Base):
|
||
"""体检机构开票信息 biz_checkup_institution_invoice"""
|
||
|
||
__tablename__ = "biz_checkup_institution_invoice"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
checkup_institution_id = Column(String(64), nullable=False, comment="体检机构ID")
|
||
company_name = Column(String(200), nullable=False, comment="单位名称")
|
||
tax_no = Column(String(64), nullable=True, comment="税号")
|
||
company_address = Column(String(512), nullable=True, comment="单位地址")
|
||
company_phone = Column(String(64), nullable=True, comment="电话")
|
||
bank_name = Column(String(200), nullable=True, comment="开户银行")
|
||
bank_account = Column(String(64), 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 BizCheckupInstitutionProject(Base):
|
||
"""体检机构项目及价格 biz_checkup_institution_project"""
|
||
|
||
__tablename__ = "biz_checkup_institution_project"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
checkup_institution_id = Column(String(64), nullable=False, comment="体检机构ID")
|
||
project_name = Column(String(200), nullable=False, comment="项目名称")
|
||
project_fee = Column(Numeric(18, 2), nullable=True, comment="项目费用(元)")
|
||
status = Column(CHAR(1), nullable=False, default="1", comment="1正常 0停用")
|
||
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 BizCheckupInstitutionPackage(Base):
|
||
"""体检机构项目套餐 biz_checkup_institution_package"""
|
||
|
||
__tablename__ = "biz_checkup_institution_package"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
checkup_institution_id = Column(String(64), nullable=False, comment="体检机构ID")
|
||
package_name = Column(String(200), nullable=False, comment="套餐名称")
|
||
package_code = Column(String(64), nullable=False, comment="套餐编码")
|
||
status = Column(CHAR(1), nullable=False, default="1", comment="1正常 0停用")
|
||
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 BizCheckupInstitutionPackageItem(Base):
|
||
"""体检机构项目套餐明细 biz_checkup_institution_package_item"""
|
||
|
||
__tablename__ = "biz_checkup_institution_package_item"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
package_id = Column(String(64), nullable=False, comment="套餐ID")
|
||
checkup_institution_project_id = Column(String(64), nullable=False, comment="机构项目ID")
|
||
project_name = Column(String(200), nullable=False, comment="项目名称快照")
|
||
project_fee = Column(Numeric(18, 2), 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="删除标记")
|
||
|
||
|
||
# =============================================================================
|
||
# 生产管理(耗材 / 试剂 / SOP / 工序分类 / 产出类型 / 耗材包 / 工艺库)
|
||
# ============================================================================
|
||
|
||
|
||
class BizConsumable(Base):
|
||
"""生产耗材 biz_consumable"""
|
||
|
||
__tablename__ = "biz_consumable"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
consumable_code = Column(String(64), nullable=False, comment="耗材编码")
|
||
consumable_name = Column(String(100), nullable=False, comment="耗材名称")
|
||
spec_model = Column(String(200), nullable=True, comment="规格型号")
|
||
standard_usage = Column(String(100), nullable=True, comment="标准用量")
|
||
unit = Column(String(64), nullable=True, comment="单位")
|
||
description = Column(String(500), nullable=True, comment="描述")
|
||
stock_qty = Column(Numeric(18, 4), nullable=False, default=0, comment="当前库存量")
|
||
warning_qty = Column(Numeric(18, 4), nullable=False, default=0, comment="预警库存量")
|
||
status = Column(String(1), nullable=False, default="1", comment="1-启用 0-停用")
|
||
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 BizReagent(Base):
|
||
"""试剂 biz_reagent"""
|
||
|
||
__tablename__ = "biz_reagent"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
reagent_code = Column(String(64), nullable=False, comment="试剂编码")
|
||
reagent_name = Column(String(100), nullable=False, comment="试剂名称")
|
||
spec = Column(String(200), nullable=True, comment="规格")
|
||
standard_usage = Column(String(100), nullable=True, comment="标准用量")
|
||
unit = Column(String(64), nullable=True, comment="单位")
|
||
description = Column(String(500), nullable=True, comment="描述")
|
||
stock_qty = Column(Numeric(18, 4), nullable=False, default=0, comment="当前库存量")
|
||
warning_qty = Column(Numeric(18, 4), nullable=False, default=0, comment="预警库存量")
|
||
status = Column(String(1), nullable=False, default="1", comment="1-启用 0-停用")
|
||
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 BizSopDocument(Base):
|
||
"""SOP文档 biz_sop_document"""
|
||
|
||
__tablename__ = "biz_sop_document"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
sop_code = Column(String(64), nullable=False, comment="SOP编号")
|
||
sop_name = Column(String(200), nullable=False, comment="SOP文档名称")
|
||
version_no = Column(String(50), nullable=True, comment="版本号")
|
||
sop_attachments = Column(String(2000), nullable=True, comment="SOP文档附件(逗号分隔URL)")
|
||
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 BizProcessCategory(Base):
|
||
"""工序分类 biz_process_category"""
|
||
|
||
__tablename__ = "biz_process_category"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
category_code = Column(String(64), nullable=False, comment="分类编码")
|
||
category_name = Column(String(100), nullable=False, 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 BizOutputType(Base):
|
||
"""产出类型 biz_output_type"""
|
||
|
||
__tablename__ = "biz_output_type"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
type_code = Column(String(64), nullable=False, comment="类型编码")
|
||
type_name = Column(String(100), nullable=False, 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 BizConsumablePack(Base):
|
||
"""耗材包 biz_consumable_pack"""
|
||
|
||
__tablename__ = "biz_consumable_pack"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
pack_code = Column(String(64), nullable=False, comment="编号")
|
||
pack_name = Column(String(100), nullable=False, comment="名称")
|
||
usage_scene = Column(String(200), nullable=True, comment="使用场景")
|
||
pack_type = Column(String(20), nullable=True, comment="类型(bzhcb-标准耗材包 zdyhcb-自定义耗材包)")
|
||
status = Column(CHAR(1), nullable=True, default="1", comment="状态(1-启用 0-停用)")
|
||
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 BizConsumablePackItem(Base):
|
||
"""耗材包明细 biz_consumable_pack_item"""
|
||
|
||
__tablename__ = "biz_consumable_pack_item"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
pack_id = Column(String(64), nullable=False, comment="耗材包id")
|
||
consumable_code = Column(String(64), nullable=True, comment="耗材编码")
|
||
consumable_name = Column(String(100), nullable=True, comment="耗材名称")
|
||
spec_model = Column(String(200), nullable=True, comment="耗材规格型号")
|
||
standard_usage = Column(String(100), nullable=True, comment="标准用量")
|
||
unit = Column(String(64), nullable=True, comment="单位")
|
||
remark = Column(String(512), nullable=True, comment="备注")
|
||
tenant_no = Column(String(64), nullable=False, default="zkxw", comment="租户编号")
|
||
order_num = Column(Integer, 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 BizProcess(Base):
|
||
"""工艺 biz_process"""
|
||
|
||
__tablename__ = "biz_process"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
process_code = Column(String(64), nullable=False, comment="工序代码")
|
||
category_id = Column(String(64), nullable=True, comment="工序分类id")
|
||
process_name = Column(String(100), nullable=False, comment="工序名称")
|
||
description = Column(String(500), nullable=True, comment="描述")
|
||
equipment_name = Column(String(200), nullable=True, comment="预计使用设备名称")
|
||
estimated_duration = Column(String(100), nullable=True, comment="预估耗时")
|
||
sop_ids = Column(String(1000), nullable=True, comment="关联SOP文档id(逗号分隔)")
|
||
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 BizProcessReagent(Base):
|
||
"""工艺试剂 biz_process_reagent"""
|
||
|
||
__tablename__ = "biz_process_reagent"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
process_id = Column(String(64), nullable=False, comment="工艺id")
|
||
reagent_code = Column(String(64), nullable=True, comment="试剂编码")
|
||
reagent_name = Column(String(100), nullable=True, comment="试剂名称")
|
||
spec = Column(String(200), nullable=True, comment="规格")
|
||
standard_usage = Column(String(100), nullable=True, comment="标准用量")
|
||
unit = Column(String(64), nullable=True, comment="单位")
|
||
is_key_material = Column(CHAR(1), nullable=True, default="0", comment="是否关键物料(0-否 1-是)")
|
||
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 BizProcessConsumable(Base):
|
||
"""工艺耗材 biz_process_consumable"""
|
||
|
||
__tablename__ = "biz_process_consumable"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
process_id = Column(String(64), nullable=False, comment="工艺id")
|
||
consumable_code = Column(String(64), nullable=True, comment="耗材编码")
|
||
consumable_name = Column(String(100), nullable=True, comment="耗材名称")
|
||
spec_model = Column(String(200), nullable=True, comment="耗材规格型号")
|
||
standard_usage = Column(String(100), nullable=True, comment="标准用量")
|
||
unit = Column(String(64), nullable=True, comment="单位")
|
||
is_required = Column(CHAR(1), nullable=True, default="1", comment="是否必需(1-必须 0-可选)")
|
||
remark = Column(String(512), nullable=True, comment="备注")
|
||
tenant_no = Column(String(64), nullable=False, default="zkxw", comment="租户编号")
|
||
order_num = Column(Integer, 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 BizProcessOutput(Base):
|
||
"""工艺产出物 biz_process_output"""
|
||
|
||
__tablename__ = "biz_process_output"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
process_id = Column(String(64), nullable=False, comment="工艺id")
|
||
output_type_id = Column(String(64), nullable=True, comment="产出类型id")
|
||
output_name = Column(String(200), nullable=True, comment="产出物名称")
|
||
output_barcode = Column(String(200), 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 BizProcessDataCollection(Base):
|
||
__tablename__ = "biz_process_data_collection"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
process_id = Column(String(64), nullable=False, comment="工艺id")
|
||
collection_name = Column(String(200), nullable=False, comment="采集项名称")
|
||
unit = Column(String(64), 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 BizProcessRoute(Base):
|
||
"""工艺路线 biz_process_route"""
|
||
|
||
__tablename__ = "biz_process_route"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
route_code = Column(String(64), nullable=False, comment="路线编码")
|
||
route_name = Column(String(100), nullable=False, comment="路线名称")
|
||
product_type_id = Column(String(64), nullable=True, comment="产品类型id")
|
||
version = Column(String(50), nullable=True, comment="版本号")
|
||
is_current = Column(CHAR(1), nullable=True, default="0", comment="是否当前版本(0-否 1-是)")
|
||
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 BizProcessRouteStep(Base):
|
||
"""工艺路线步骤 biz_process_route_step"""
|
||
|
||
__tablename__ = "biz_process_route_step"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
route_id = Column(String(64), nullable=False, comment="路线id")
|
||
process_id = Column(String(64), nullable=True, comment="关联工艺id")
|
||
step_order = Column(Integer, nullable=True, comment="步骤顺序")
|
||
process_code = Column(String(64), nullable=True, comment="工序代码")
|
||
category_id = Column(String(64), nullable=True, comment="工序分类id")
|
||
process_name = Column(String(100), nullable=True, comment="工序名称")
|
||
description = Column(String(500), nullable=True, comment="描述")
|
||
equipment_name = Column(String(200), nullable=True, comment="预计使用设备名称")
|
||
estimated_duration = Column(String(100), nullable=True, comment="预估耗时")
|
||
sop_ids = Column(String(1000), nullable=True, comment="关联SOP文档id(逗号分隔)")
|
||
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 BizProcessRouteStepReagent(Base):
|
||
"""工艺路线步骤试剂 biz_process_route_step_reagent"""
|
||
|
||
__tablename__ = "biz_process_route_step_reagent"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
step_id = Column(String(64), nullable=False, comment="步骤id")
|
||
reagent_code = Column(String(64), nullable=True, comment="试剂编码")
|
||
reagent_name = Column(String(100), nullable=True, comment="试剂名称")
|
||
spec = Column(String(200), nullable=True, comment="规格")
|
||
standard_usage = Column(String(100), nullable=True, comment="标准用量")
|
||
unit = Column(String(64), nullable=True, comment="单位")
|
||
is_key_material = Column(CHAR(1), nullable=True, default="0", comment="是否关键物料(0-否 1-是)")
|
||
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 BizProcessRouteStepConsumable(Base):
|
||
"""工艺路线步骤耗材 biz_process_route_step_consumable"""
|
||
|
||
__tablename__ = "biz_process_route_step_consumable"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
step_id = Column(String(64), nullable=False, comment="步骤id")
|
||
consumable_code = Column(String(64), nullable=True, comment="耗材编码")
|
||
consumable_name = Column(String(100), nullable=True, comment="耗材名称")
|
||
spec_model = Column(String(200), nullable=True, comment="耗材规格型号")
|
||
standard_usage = Column(String(100), nullable=True, comment="标准用量")
|
||
unit = Column(String(64), nullable=True, comment="单位")
|
||
is_required = Column(CHAR(1), nullable=True, default="1", comment="是否必需(1-必须 0-可选)")
|
||
remark = Column(String(512), nullable=True, comment="备注")
|
||
tenant_no = Column(String(64), nullable=False, default="zkxw", comment="租户编号")
|
||
order_num = Column(Integer, 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 BizProcessRouteStepOutput(Base):
|
||
"""工艺路线步骤产出物 biz_process_route_step_output"""
|
||
|
||
__tablename__ = "biz_process_route_step_output"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
step_id = Column(String(64), nullable=False, comment="步骤id")
|
||
output_type_id = Column(String(64), nullable=True, comment="产出类型id")
|
||
output_name = Column(String(200), nullable=True, comment="产出物名称")
|
||
output_barcode = Column(String(200), 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 BizProcessRouteStepDataCollection(Base):
|
||
"""工艺路线步骤数据采集项 biz_process_route_step_data_collection"""
|
||
|
||
__tablename__ = "biz_process_route_step_data_collection"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
step_id = Column(String(64), nullable=False, comment="步骤id")
|
||
collection_name = Column(String(100), nullable=True, comment="采集项名称")
|
||
unit = Column(String(64), 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 BizCellProduct(Base):
|
||
"""细胞产品 biz_cell_product"""
|
||
|
||
__tablename__ = "biz_cell_product"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
product_code = Column(String(64), nullable=False, comment="产品编码")
|
||
product_name = Column(String(200), nullable=False, comment="产品名称")
|
||
product_type_id = Column(String(64), nullable=True, comment="产品类型ID")
|
||
spec_id = Column(String(64), nullable=True, comment="规格ID")
|
||
batch_no = Column(String(64), nullable=True, comment="批号")
|
||
storage_slot_id = Column(String(64), nullable=True, comment="库位ID")
|
||
passage = Column(String(8), nullable=True, comment="代次(P1~P8)")
|
||
freeze_date = Column(DateTime, nullable=True, comment="冻存日期")
|
||
expected_cell_count = Column(Numeric(18, 4), nullable=True, comment="预计细胞数量(单位:亿)")
|
||
viability = Column(Numeric(5, 2), nullable=True, comment="活性(百分比,0~100)")
|
||
product_status = Column(String(16), nullable=True, default="frozen", comment="产品状态 frozen已冻存/sold已售卖/used已使用/voided已作废")
|
||
source_type = Column(String(32), nullable=True, default="production", comment="来源类型 production生产 qc质检")
|
||
production_task_id = Column(String(64), nullable=True, comment="生产任务ID")
|
||
quantity = Column(Numeric(18, 4), nullable=True, comment="数量")
|
||
unit = Column(String(64), nullable=True, comment="单位")
|
||
expiry_date = Column(DateTime, nullable=True, comment="有效期")
|
||
product_images = Column(String(4000), nullable=True, comment="产品图片(逗号分隔URL)")
|
||
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 BizProductionWorkOrder(Base):
|
||
"""生产工单 biz_production_work_order"""
|
||
|
||
__tablename__ = "biz_production_work_order"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
work_order_no = Column(String(32), nullable=False, comment="工单号")
|
||
work_order_type = Column(String(20), nullable=False, default="inbound", comment="工单类型: inbound=入库, temporary=临时")
|
||
reception_id = Column(String(64), nullable=True, comment="接收记录ID")
|
||
protocol_sample_id = Column(String(64), nullable=True, comment="协议样本ID")
|
||
collection_protocol_id = Column(String(64), nullable=True, comment="采集协议单ID")
|
||
protocol_no = Column(String(64), nullable=True, comment="协议号快照")
|
||
sample_code = Column(String(32), nullable=True, comment="样本编码快照")
|
||
reception_source = Column(String(20), nullable=True, default="cell_storage", comment="来源类型 cell_storage细胞存储 research_donation科研捐赠")
|
||
work_order_status = Column(String(16), nullable=False, default="dpz", comment="工单状态 dpz待配置 jxz进行中 ywc已完成")
|
||
configured_time = Column(DateTime, nullable=True, comment="配置时间")
|
||
configured_by = Column(String(64), 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 BizProductionTask(Base):
|
||
"""生产任务 biz_production_task"""
|
||
|
||
__tablename__ = "biz_production_task"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
task_no = Column(String(32), nullable=False, comment="任务号")
|
||
work_order_id = Column(String(64), nullable=False, comment="工单ID")
|
||
order_source = Column(String(20), nullable=False, default="inbound", comment="工单来源: inbound=入库, temporary=临时")
|
||
task_type = Column(String(20), nullable=False, default="cell_storage", comment="任务类型 cell_storage入库生产单 outbound出库生产单")
|
||
task_name = Column(String(200), nullable=True, comment="任务名称")
|
||
description = Column(String(500), nullable=True, comment="描述")
|
||
route_id = Column(String(64), nullable=True, comment="工艺路线ID")
|
||
task_status = Column(String(16), nullable=False, default="dpz", comment="任务状态 dpz待配置 dpz待执行 jxz执行中 ywc已完成")
|
||
started_time = Column(DateTime, nullable=True, comment="开始时间")
|
||
completed_time = Column(DateTime, nullable=True, comment="完成时间")
|
||
remark = Column(String(512), nullable=True, comment="备注")
|
||
attachments = Column(String(4000), nullable=True, comment="附件(逗号分隔URL)")
|
||
tenant_no = Column(String(64), nullable=False, default="zkxw", comment="租户编号")
|
||
order_num = Column(Integer, 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 BizProductionTaskInput(Base):
|
||
"""生产任务投入物 biz_production_task_input"""
|
||
|
||
__tablename__ = "biz_production_task_input"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
task_id = Column(String(64), nullable=False, comment="任务ID")
|
||
input_type = Column(String(32), nullable=True, comment="投入物类型 sample样本 reagent试剂 consumable耗材")
|
||
input_id = Column(String(64), nullable=True, comment="投入物ID")
|
||
input_code = Column(String(64), nullable=True, comment="投入物编码")
|
||
input_name = Column(String(200), 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 BizProductionTaskStep(Base):
|
||
"""生产任务步骤 biz_production_task_step"""
|
||
|
||
__tablename__ = "biz_production_task_step"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
task_id = Column(String(64), nullable=False, comment="任务ID")
|
||
step_order = Column(Integer, nullable=True, comment="步骤顺序")
|
||
process_code = Column(String(64), nullable=True, comment="工序代码")
|
||
category_id = Column(String(64), nullable=True, comment="工序分类ID")
|
||
process_name = Column(String(100), nullable=True, comment="工序名称")
|
||
description = Column(String(500), nullable=True, comment="描述")
|
||
equipment_name = Column(String(200), nullable=True, comment="预计使用设备名称")
|
||
estimated_duration = Column(String(100), nullable=True, comment="预估耗时")
|
||
actual_duration = Column(String(100), nullable=True, comment="实际耗时")
|
||
sop_ids = Column(String(1000), nullable=True, comment="关联SOP文档id(逗号分隔)")
|
||
step_status = Column(String(16), nullable=True, default="dzx", comment="步骤状态 dzx待执行 jxz执行中 ywc已完成")
|
||
started_time = Column(DateTime, nullable=True, comment="开始时间")
|
||
completed_time = Column(DateTime, 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 BizProductionTaskStepReagent(Base):
|
||
"""生产任务步骤试剂 biz_production_task_step_reagent"""
|
||
|
||
__tablename__ = "biz_production_task_step_reagent"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
step_id = Column(String(64), nullable=False, comment="步骤ID")
|
||
reagent_code = Column(String(64), nullable=True, comment="试剂编码")
|
||
reagent_name = Column(String(100), nullable=True, comment="试剂名称")
|
||
spec = Column(String(200), nullable=True, comment="规格")
|
||
standard_usage = Column(String(100), nullable=True, comment="标准用量")
|
||
actual_usage = Column(String(100), nullable=True, comment="实际用量")
|
||
unit = Column(String(64), nullable=True, comment="单位")
|
||
is_key_material = Column(CHAR(1), nullable=True, default="0", comment="是否关键物料(0-否 1-是)")
|
||
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 BizProductionTaskStepConsumable(Base):
|
||
"""生产任务步骤耗材 biz_production_task_step_consumable"""
|
||
|
||
__tablename__ = "biz_production_task_step_consumable"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
step_id = Column(String(64), nullable=False, comment="步骤ID")
|
||
consumable_code = Column(String(64), nullable=True, comment="耗材编码")
|
||
consumable_name = Column(String(100), nullable=True, comment="耗材名称")
|
||
spec_model = Column(String(200), nullable=True, comment="耗材规格型号")
|
||
standard_usage = Column(String(100), nullable=True, comment="标准用量")
|
||
actual_usage = Column(String(100), nullable=True, comment="实际用量")
|
||
unit = Column(String(64), nullable=True, comment="单位")
|
||
is_required = Column(CHAR(1), nullable=True, default="1", comment="是否必需(1-必须 0-可选)")
|
||
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 BizProductionTaskStepOutput(Base):
|
||
"""生产任务步骤产出物 biz_production_task_step_output"""
|
||
|
||
__tablename__ = "biz_production_task_step_output"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
step_id = Column(String(64), nullable=False, comment="步骤ID")
|
||
output_type_id = Column(String(64), nullable=True, comment="产出类型ID")
|
||
output_name = Column(String(200), nullable=True, comment="产出物名称")
|
||
output_barcode = Column(String(200), 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 BizProductionTaskStepDataCollection(Base):
|
||
"""生产任务步骤数据采集项 biz_production_task_step_data_collection"""
|
||
|
||
__tablename__ = "biz_production_task_step_data_collection"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
step_id = Column(String(64), nullable=False, comment="步骤ID")
|
||
collection_name = Column(String(200), nullable=True, comment="采集项名称")
|
||
unit = Column(String(64), nullable=True, comment="单位")
|
||
collection_value = Column(String(500), 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 BizProductionTaskOutput(Base):
|
||
"""生产任务最终产出 biz_production_task_output"""
|
||
|
||
__tablename__ = "biz_production_task_output"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
task_id = Column(String(64), nullable=False, comment="任务ID")
|
||
cell_product_id = Column(String(64), nullable=True, comment="细胞产品ID")
|
||
storage_slot_id = Column(String(64), nullable=True, comment="库位ID")
|
||
output_name = Column(String(200), nullable=True, comment="产出物名称")
|
||
output_barcode = Column(String(200), nullable=True, comment="产出物条码")
|
||
quantity = Column(Numeric(18, 4), nullable=True, comment="数量")
|
||
unit = Column(String(64), nullable=True, comment="单位")
|
||
remark = Column(String(512), nullable=True, comment="备注")
|
||
attachments = Column(String(4000), nullable=True, comment="附件(逗号分隔URL)")
|
||
tenant_no = Column(String(64), nullable=False, default="zkxw", comment="租户编号")
|
||
order_num = Column(Integer, 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 BizProtocolFullmoonTodo(Base):
|
||
"""新生儿满月待办 biz_protocol_fullmoon_todo"""
|
||
|
||
__tablename__ = "biz_protocol_fullmoon_todo"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
collection_protocol_id = Column(String(64), nullable=False, comment="采集协议单ID")
|
||
todo_status = Column(CHAR(1), nullable=False, default="0", comment="1已办保险 0未办保险")
|
||
handle_date = Column(CHAR(8), nullable=True, comment="办理日期")
|
||
handle_remark = Column(String(512), nullable=True, comment="办理备注")
|
||
insurance_attachments = Column(String(4000), nullable=True, comment="保险附件逗号分隔")
|
||
insurance_company_id = Column(String(64), nullable=True, comment="保险公司ID")
|
||
insurance_company_name = Column(String(200), nullable=True, comment="保险公司名称(冗余快照)")
|
||
insurance_type = Column(String(200), nullable=True, comment="保险险种")
|
||
insurance_policy_no = Column(String(100), nullable=True, comment="保险单号")
|
||
insurance_effective_date = Column(CHAR(8), nullable=True, comment="保险单生效时间YYYYMMDD")
|
||
insurance_expiry_date = Column(CHAR(8), nullable=True, comment="保险单失效时间YYYYMMDD")
|
||
insurance_subscribed = Column(CHAR(1), nullable=True, default="0", comment="是否已订购保险")
|
||
insurance_fee = Column(Numeric(18, 2), 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 BizInsuranceCompany(Base):
|
||
"""保险公司 biz_insurance_company"""
|
||
|
||
__tablename__ = "biz_insurance_company"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
company_name = Column(String(200), nullable=False, comment="保险公司名称")
|
||
company_address = Column(String(512), nullable=True, comment="公司地址")
|
||
contact_name = Column(String(100), nullable=True, comment="联系人")
|
||
contact_phone = Column(String(32), nullable=True, comment="联系电话")
|
||
status = Column(CHAR(1), nullable=False, default="1", comment="1正常 0停用")
|
||
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 BizInsuranceCompanyInvoice(Base):
|
||
"""保险公司开票信息 biz_insurance_company_invoice"""
|
||
|
||
__tablename__ = "biz_insurance_company_invoice"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
insurance_company_id = Column(String(64), nullable=False, comment="保险公司ID")
|
||
company_name = Column(String(200), nullable=False, comment="单位名称")
|
||
tax_no = Column(String(64), nullable=True, comment="税号")
|
||
company_address = Column(String(512), nullable=True, comment="单位地址")
|
||
company_phone = Column(String(64), nullable=True, comment="电话")
|
||
bank_name = Column(String(200), nullable=True, comment="开户银行")
|
||
bank_account = Column(String(64), 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 BizInsuranceProjectPrice(Base):
|
||
"""保险险种价格 biz_insurance_project_price"""
|
||
|
||
__tablename__ = "biz_insurance_project_price"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
insurance_company_id = Column(String(64), nullable=False, comment="保险公司ID")
|
||
project_name = Column(String(200), nullable=False, comment="险种名称")
|
||
project_fee = Column(Numeric(18, 2), nullable=True, comment="险种费用(元)")
|
||
status = Column(CHAR(1), nullable=False, default="1", comment="1正常 0停用")
|
||
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 BizConsumableStockLog(Base):
|
||
"""耗材变动记录 biz_consumable_stock_log"""
|
||
|
||
__tablename__ = "biz_consumable_stock_log"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
material_id = Column(String(64), nullable=False, comment="耗材ID")
|
||
material_code = Column(String(64), nullable=True, comment="耗材编码快照")
|
||
material_name = Column(String(200), nullable=True, comment="耗材名称快照")
|
||
change_type = Column(String(16), nullable=False, comment="变动类型:in/use")
|
||
change_qty = Column(Numeric(18, 4), nullable=False, comment="变动数量")
|
||
stock_before = Column(Numeric(18, 4), nullable=False, comment="变动前库存")
|
||
stock_after = Column(Numeric(18, 4), nullable=False, comment="变动后库存")
|
||
source_type = Column(String(16), nullable=False, comment="来源:manual_in/manual_out/step_save")
|
||
step_id = Column(String(64), nullable=True, comment="生产任务步骤ID")
|
||
step_name = Column(String(200), nullable=True, comment="步骤名称快照")
|
||
task_id = Column(String(64), nullable=True, comment="生产任务ID")
|
||
task_no = Column(String(32), nullable=True, comment="生产任务编号快照")
|
||
receiver = Column(String(64), nullable=True, comment="领用人")
|
||
purpose = Column(String(512), nullable=True, comment="用途/事由")
|
||
tenant_no = Column(String(64), nullable=False, default="zkxw", 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 BizReagentStockLog(Base):
|
||
"""试剂变动记录 biz_reagent_stock_log"""
|
||
|
||
__tablename__ = "biz_reagent_stock_log"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
material_id = Column(String(64), nullable=False, comment="试剂ID")
|
||
material_code = Column(String(64), nullable=True, comment="试剂编码快照")
|
||
material_name = Column(String(200), nullable=True, comment="试剂名称快照")
|
||
change_type = Column(String(16), nullable=False, comment="变动类型:in/use")
|
||
change_qty = Column(Numeric(18, 4), nullable=False, comment="变动数量")
|
||
stock_before = Column(Numeric(18, 4), nullable=False, comment="变动前库存")
|
||
stock_after = Column(Numeric(18, 4), nullable=False, comment="变动后库存")
|
||
source_type = Column(String(16), nullable=False, comment="来源:manual_in/manual_out/step_save")
|
||
step_id = Column(String(64), nullable=True, comment="生产任务步骤ID")
|
||
step_name = Column(String(200), nullable=True, comment="步骤名称快照")
|
||
task_id = Column(String(64), nullable=True, comment="生产任务ID")
|
||
task_no = Column(String(32), nullable=True, comment="生产任务编号快照")
|
||
receiver = Column(String(64), nullable=True, comment="领用人")
|
||
purpose = Column(String(512), nullable=True, comment="用途/事由")
|
||
tenant_no = Column(String(64), nullable=False, default="zkxw", 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="删除标记")
|
||
|
||
|
||
from app.models.qc_param import BizQcItemParam, BizQcTaskResult # noqa: E402,F401
|
||
from app.models.qc_material import BizQcMaterial, BizQcMaterialUsage # noqa: E402,F401
|
||
from app.models.material import BizMaterial, BizMaterialStockLog # noqa: E402,F401
|