Unify effective roles via post-role bindings, remove dedicated OA role UI, and update OA assignee resolution plus related SQL/docs. Co-authored-by: Cursor <cursoragent@cursor.com>
3925 lines
247 KiB
Python
3925 lines
247 KiB
Python
"""数据模型(与 docs/sql/zkxw.sql 全库导出基线对齐的核心系统表)"""
|
||
from datetime import datetime
|
||
import enum
|
||
|
||
from sqlalchemy import Column, String, DateTime, Date, 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")
|
||
supervisor_user_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="手机号码")
|
||
hire_date = Column(Date, nullable=True, comment="入职日期")
|
||
probation_months = Column(Integer, nullable=True, comment="试用期月数")
|
||
last_work_day = Column(Date, nullable=True, 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_user_id = Column(String(64), nullable=True, comment="部门负责人用户ID")
|
||
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="业务范围")
|
||
site_image = Column(String(512), 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 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 SysPostRole(Base):
|
||
"""职位-角色关联 sys_post_role"""
|
||
|
||
__tablename__ = "sys_post_role"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
post_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 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="快递公司名称")
|
||
express_logo = Column(String(512), nullable=True, comment="快递公司Logo 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 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="样本类型名称")
|
||
type_logo = Column(String(512), nullable=True, comment="样本类型Logo URL")
|
||
storage_years = Column(Integer, nullable=True, comment="样本存储年份")
|
||
storage_price = Column(Numeric(18, 2), nullable=True, comment="样本存储价格(元)")
|
||
sample_code_filter = 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 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 BizBizNoSequence(Base):
|
||
"""业务协议号日序列表 biz_biz_no_sequence"""
|
||
|
||
__tablename__ = "biz_biz_no_sequence"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
prefix = Column(String(16), nullable=False, comment="前缀 XBCC/JZCC")
|
||
biz_date = Column(String(8), nullable=False, comment="YYYYMMDD")
|
||
last_seq = Column(Integer, 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 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-已删除")
|
||
|
||
|
||
# =============================================================================
|
||
# OA 审批(钉钉交互,oa_*)
|
||
# =============================================================================
|
||
|
||
|
||
class OaAppGroup(Base):
|
||
"""OA审批分组 oa_app_group"""
|
||
|
||
__tablename__ = "oa_app_group"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
group_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 OaApp(Base):
|
||
"""OA审批应用 oa_app"""
|
||
|
||
__tablename__ = "oa_app"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
group_id = Column(String(64), nullable=True, comment="分组ID")
|
||
app_name = Column(String(50), nullable=False, comment="表单/应用名称")
|
||
icon_url = Column(String(512), nullable=True, comment="图标")
|
||
description = Column(String(100), nullable=True, comment="表单说明")
|
||
initiator_scope = Column(String(32), nullable=False, default="all", comment="发起范围")
|
||
initiator_user_ids = Column(Text, nullable=True, comment="指定发起人JSON")
|
||
admin_scope = Column(String(32), nullable=False, default="all_oa_admin", comment="管理员范围")
|
||
admin_user_ids = Column(Text, nullable=True, comment="指定管理员JSON")
|
||
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 OaAppVersion(Base):
|
||
"""OA审批应用版本 oa_app_version"""
|
||
|
||
__tablename__ = "oa_app_version"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
app_id = Column(String(64), nullable=False, comment="应用ID")
|
||
version_no = Column(Integer, nullable=False, comment="版本号")
|
||
status = Column(String(16), nullable=False, default="draft", comment="draft/published")
|
||
is_latest_published = Column(CHAR(1), nullable=False, default="0", comment="是否最新已发布")
|
||
form_schema_json = Column(Text, nullable=True, comment="表单Schema JSON")
|
||
flow_tree_json = Column(Text, nullable=True, comment="流程树 JSON")
|
||
advanced_settings_json = Column(Text, nullable=True, comment="高级设置 JSON")
|
||
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 OaReceiveAccount(Base):
|
||
"""OA收款账户 oa_receive_account"""
|
||
|
||
__tablename__ = "oa_receive_account"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
account_type = Column(String(16), nullable=False, comment="alipay/personal/corporate")
|
||
account_name = Column(String(128), nullable=False, comment="户名")
|
||
account_no = Column(String(128), nullable=False, comment="账号")
|
||
bank_name = Column(String(128), nullable=True, comment="银行")
|
||
bank_province = Column(String(64), nullable=True, comment="省")
|
||
bank_city = Column(String(64), nullable=True, comment="市")
|
||
bank_branch = 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 OaInstance(Base):
|
||
"""OA审批实例 oa_instance"""
|
||
|
||
__tablename__ = "oa_instance"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
app_id = Column(String(64), nullable=False, comment="应用ID")
|
||
app_version_id = Column(String(64), nullable=False, comment="锁定版本ID")
|
||
title = Column(String(200), nullable=True, comment="实例标题")
|
||
initiator_user_id = Column(String(64), nullable=False, comment="发起人")
|
||
initiator_dept_id = Column(String(64), nullable=True, comment="发起人部门")
|
||
form_data_json = Column(Text, nullable=True, comment="表单数据 JSON")
|
||
initiator_select_json = Column(Text, nullable=True, comment="发起人自选 JSON {nodeId:[userId,...]}")
|
||
status = Column(
|
||
String(32),
|
||
nullable=False,
|
||
default="running",
|
||
comment="running/returned/completed/rejected/cancelled",
|
||
)
|
||
source_instance_id = Column(String(64), nullable=True, comment="撤销重提原实例ID")
|
||
current_round = Column(Integer, 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 OaTask(Base):
|
||
"""OA审批任务 oa_task"""
|
||
|
||
__tablename__ = "oa_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")
|
||
node_name = Column(String(200), nullable=True, comment="节点名称")
|
||
task_type = Column(String(16), nullable=False, default="approval", comment="approval/cc")
|
||
assignee_user_id = Column(String(64), nullable=False, comment="处理人")
|
||
status = Column(String(32), nullable=False, default="pending", comment="任务状态")
|
||
comment_text = Column(String(512), nullable=True, comment="意见")
|
||
resolve_source = Column(String(64), nullable=True, comment="解析来源")
|
||
sign_mode = Column(String(8), nullable=True, comment="or/and")
|
||
round_no = Column(Integer, 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 OaInstanceEvent(Base):
|
||
"""OA实例操作事件 oa_instance_event"""
|
||
|
||
__tablename__ = "oa_instance_event"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
instance_id = Column(String(64), nullable=False, comment="实例ID")
|
||
round_no = Column(Integer, nullable=False, default=1, comment="轮次")
|
||
event_type = Column(String(32), nullable=False, comment="submit/return/withdraw/…")
|
||
actor_user_id = Column(String(64), nullable=True, comment="操作人")
|
||
task_id = Column(String(64), nullable=True, comment="关联任务")
|
||
node_key = Column(String(64), nullable=True, comment="节点key")
|
||
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="删除标记")
|
||
|
||
|
||
class OaRelation(Base):
|
||
"""OA关联审批 oa_relation"""
|
||
|
||
__tablename__ = "oa_relation"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
from_instance_id = Column(String(64), nullable=False, comment="本实例ID")
|
||
to_instance_id = Column(String(64), nullable=False, comment="被关联实例ID")
|
||
field_key = Column(String(64), nullable=True, comment="表单字段key")
|
||
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="删除标记")
|
||
|
||
|
||
# =============================================================================
|
||
# 细胞存储 — 采集协议单(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="协议附件")
|
||
consent_form_urls = Column(String(4000), nullable=True, comment="知情同意书附件URL(逗号分隔)")
|
||
health_survey_form_urls = Column(String(4000), nullable=True, comment="孕妇健康调查表附件URL(逗号分隔)")
|
||
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="协议作废描述")
|
||
void_type = Column(String(32), nullable=True, comment="协议作废类型(字典 xyzflx)")
|
||
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(Numeric(10, 2), nullable=True, comment="每期间隔(月)")
|
||
lump_sum_deadline = Column(CHAR(8), nullable=True, comment="趸交截止时间YYYYMMDD")
|
||
installment_start_date = Column(CHAR(8), nullable=True, comment="分期开始YYYYMMDD")
|
||
installment_advance_days = Column(Integer, nullable=True, default=30, comment="第2期起应缴费提前天数")
|
||
installment_ratios = Column(String(256), nullable=True, comment="各期缴费比例JSON数组")
|
||
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 BizProtocolInvoiceRequest(Base):
|
||
"""采集协议单开票申请主表 biz_protocol_invoice_request"""
|
||
|
||
__tablename__ = "biz_protocol_invoice_request"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
collection_protocol_id = Column(String(64), nullable=False, comment="采集协议单ID")
|
||
invoice_amount = Column(Numeric(18, 2), nullable=False, comment="开票合计金额")
|
||
invoice_title = Column(String(200), nullable=True, 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="银行账号")
|
||
apply_remark = Column(String(512), nullable=True, comment="申请备注")
|
||
invoice_attachments = Column(Text, nullable=True, comment="财务发票附件")
|
||
finance_remark = Column(String(512), nullable=True, comment="财务备注")
|
||
status = Column(String(8), nullable=False, default="dkp", comment="dkp/ykp")
|
||
finance_handle_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 BizProtocolInvoiceRequestItem(Base):
|
||
"""采集协议单开票申请明细 biz_protocol_invoice_request_item"""
|
||
|
||
__tablename__ = "biz_protocol_invoice_request_item"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
invoice_request_id = Column(String(64), nullable=False, comment="开票申请主表ID")
|
||
payment_id = Column(String(64), nullable=False, comment="缴费主表ID")
|
||
payment_detail_id = Column(String(64), nullable=False, comment="缴费明细ID")
|
||
installment_no = Column(Integer, nullable=True, comment="期数快照")
|
||
line_amount = Column(Numeric(18, 2), 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 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_email = Column(String(128), 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="新生儿身份证号")
|
||
expected_delivery_date = Column(Date, 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="优惠价格(元)")
|
||
original_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")
|
||
is_special = Column(SmallInteger, nullable=False, default=0, comment="是否特殊样本:0否 1是")
|
||
special_remark = 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 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="样本编码快照")
|
||
lab_storage_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 BizSampleProductionReception(Base):
|
||
"""生产部门样本接收登记 biz_sample_production_reception"""
|
||
|
||
__tablename__ = "biz_sample_production_reception"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
reception_id = Column(String(64), nullable=False, comment="关联 biz_sample_reception.id")
|
||
sample_code = Column(String(32), nullable=True, comment="样本编码快照")
|
||
reception_source = Column(
|
||
String(20), nullable=False, default="cell_storage", comment="来源 cell_storage/research_donation"
|
||
)
|
||
sample_type_name = Column(String(100), nullable=True, comment="样本类型名称快照")
|
||
handler_user_id = Column(String(64), nullable=True, comment="处理人用户ID")
|
||
handler_name = Column(String(100), nullable=True, comment="处理人姓名")
|
||
process_time = Column(DateTime, nullable=False, comment="处理时间")
|
||
original_blood_weight_g = Column(Numeric(18, 4), nullable=True, comment="原血重量/g")
|
||
hes_volume_ml = Column(Numeric(18, 4), nullable=True, comment="HES用量/ml")
|
||
blood_type = Column(String(32), nullable=True, comment="血型")
|
||
infectious_four_test_result = Column(String(16), nullable=True, comment="传染四项 zc正常 bzc不正常")
|
||
enriched_blood_weight_g = Column(Numeric(18, 4), nullable=True, comment="富集后血量/g")
|
||
cryopreservation_volume_ml = Column(Numeric(18, 4), nullable=True, comment="冻存液用量/ml")
|
||
inoculation_amount = Column(Numeric(18, 4), nullable=True, comment="接种量")
|
||
cryopreservation_time = Column(DateTime, nullable=True, comment="冻存时间")
|
||
storage_total_tubes = Column(Integer, nullable=True, comment="储存总量(管)")
|
||
available_cell_count_1e7 = Column(Numeric(18, 4), nullable=True, comment="可提供细胞数量/*10E7")
|
||
original_blood_volume_ml = Column(Numeric(18, 4), nullable=True, comment="原血体积/ml")
|
||
nucleated_cell_count_1e8 = Column(Numeric(18, 4), nullable=True, comment="有核细胞数/10E8")
|
||
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 BizQcSmsNotification(Base):
|
||
"""样本质检短信通知 biz_qc_sms_notification"""
|
||
|
||
__tablename__ = "biz_qc_sms_notification"
|
||
|
||
id = Column(String(64), primary_key=True)
|
||
qc_work_order_id = Column(String(64), nullable=True, comment="关联 biz_qc_work_order.id")
|
||
protocol_sample_id = Column(String(64), nullable=True, comment="关联 biz_protocol_sample.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 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="联系电话")
|
||
company_logo = Column(String(512), nullable=True, comment="公司Logo URL")
|
||
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临时质检",
|
||
)
|
||
trigger_source = Column(
|
||
String(20),
|
||
nullable=False,
|
||
default="reception",
|
||
comment="触发来源 reception=样本接收 schedule=计划创建 production=生产过程",
|
||
)
|
||
infusion_schedule_id = Column(String(64), nullable=True, comment="中试输注计划ID(出库质检关联)")
|
||
biz_type = Column(String(20), nullable=True, comment="业务类型: pilot_service=中试服务, clinical_application=临床应用")
|
||
cell_product_id = Column(String(64), nullable=True, comment="质检对象-细胞产品ID")
|
||
production_work_order_id = Column(String(64), nullable=True, comment="关联生产工单ID(生产过程触发时)")
|
||
production_task_id = Column(String(64), nullable=True, comment="关联生产任务ID(可选)")
|
||
production_step_output_id = Column(String(64), nullable=True, comment="关联生产任务步骤产出物ID(生产过程触发时)")
|
||
work_order_status = Column(String(16), nullable=False, default="dpz", comment="工单状态")
|
||
conclusion = Column(String(16), nullable=True, comment="质检结论 tg合格 btg不合格")
|
||
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 BizQcWorkOrderInspectionBatch(Base):
|
||
"""质检工单检测批次 biz_qc_work_order_inspection_batch"""
|
||
|
||
__tablename__ = "biz_qc_work_order_inspection_batch"
|
||
|
||
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="工单来源")
|
||
batch_no = Column(String(32), nullable=False, comment="批次编号")
|
||
batch_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 BizQcBatchAssignee(Base):
|
||
"""质检检测批次负责人 biz_qc_batch_assignee"""
|
||
|
||
__tablename__ = "biz_qc_batch_assignee"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键")
|
||
batch_id = Column(String(64), nullable=False, comment="检测批次ID")
|
||
user_id = Column(String(64), nullable=False, comment="负责人用户ID")
|
||
tenant_no = Column(String(64), nullable=False, default="zkxw", comment="租户编号")
|
||
order_num = Column(Integer, nullable=True, default=0, comment="展示顺序")
|
||
remark = Column(String(512), nullable=True, comment="备注")
|
||
create_by = Column(String(64), nullable=True, comment="创建人id")
|
||
create_dept_id = Column(String(64), nullable=True, comment="创建人部门ID")
|
||
create_time = Column(DateTime, nullable=True, comment="创建时间")
|
||
update_by = Column(String(64), nullable=True, comment="更新人id")
|
||
update_time = Column(DateTime, nullable=True, 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=临时")
|
||
batch_id = Column(String(64), nullable=True, comment="检测批次ID")
|
||
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=临时")
|
||
batch_id = Column(String(64), nullable=True, comment="检测批次ID")
|
||
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")
|
||
batch_id = Column(String(64), nullable=True, 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="删除标记")
|
||
|
||
|
||
class BizQcTaskAssignee(Base):
|
||
"""质检任务负责人 biz_qc_task_assignee"""
|
||
|
||
__tablename__ = "biz_qc_task_assignee"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键")
|
||
task_id = Column(String(64), nullable=False, comment="质检任务ID")
|
||
user_id = Column(String(64), nullable=False, comment="负责人用户ID")
|
||
tenant_no = Column(String(64), nullable=False, default="zkxw", comment="租户编号")
|
||
order_num = Column(Integer, nullable=True, default=0, comment="展示顺序")
|
||
remark = Column(String(512), nullable=True, comment="备注")
|
||
create_by = Column(String(64), nullable=True, comment="创建人id")
|
||
create_dept_id = Column(String(64), nullable=True, comment="创建人部门ID")
|
||
create_time = Column(DateTime, nullable=True, comment="创建时间")
|
||
update_by = Column(String(64), nullable=True, comment="更新人id")
|
||
update_time = Column(DateTime, nullable=True, 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²")
|
||
room_image = Column(String(512), 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 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 BizCleanRoomUvDisinfectLog(Base):
|
||
"""洁净室紫外线消毒记录 biz_clean_room_uv_disinfect_log"""
|
||
|
||
__tablename__ = "biz_clean_room_uv_disinfect_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")
|
||
operator_name = Column(String(100), nullable=True, comment="操作人姓名(冗余)")
|
||
start_time = Column(DateTime, nullable=False, comment="消毒开始时间")
|
||
end_time = Column(DateTime, nullable=True, comment="消毒结束时间")
|
||
duration_minutes = Column(Integer, 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_code = Column(String(32), nullable=False, default="", 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 BizProductionProductType(Base):
|
||
"""生产产品类型 biz_production_product_type(生产专用,结构对齐 biz_cell_product_type)"""
|
||
|
||
__tablename__ = "biz_production_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 BizChannelAccount(Base):
|
||
"""渠道账户余额 biz_channel_account"""
|
||
|
||
__tablename__ = "biz_channel_account"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
channel_id = Column(String(64), nullable=False, comment="渠道ID")
|
||
balance_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 BizChannelProductQuota(Base):
|
||
"""渠道产品份数库存 biz_channel_product_quota"""
|
||
|
||
__tablename__ = "biz_channel_product_quota"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
channel_id = Column(String(64), nullable=False, comment="渠道ID")
|
||
project_code = Column(String(64), nullable=True, comment="项目编码")
|
||
project_name = Column(String(200), 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="规格")
|
||
total_qty = Column(Numeric(18, 4), nullable=False, default=0, comment="总购买份数")
|
||
used_qty = Column(Numeric(18, 4), nullable=False, default=0, comment="已使用份数")
|
||
remaining_qty = Column(Numeric(18, 4), 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 BizChannelServiceOrder(Base):
|
||
"""渠道服务订单 biz_channel_service_order"""
|
||
|
||
__tablename__ = "biz_channel_service_order"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
channel_id = Column(String(64), nullable=False, comment="渠道ID")
|
||
channel_name = Column(String(200), nullable=True, comment="渠道名称")
|
||
order_name = Column(String(200), nullable=True, comment="服务订单名称")
|
||
dept_name = Column(String(200), nullable=True, comment="部门名称")
|
||
order_type = Column(String(16), nullable=False, comment="订单类型 cz充值 gm购买 tk退款")
|
||
prepay_amount = Column(Numeric(18, 2), nullable=True, comment="预存金额(元)")
|
||
purchase_total_amount = Column(Numeric(18, 2), nullable=True, comment="购买总金额(元)")
|
||
order_status = Column(String(16), nullable=False, default="sxz", comment="订单状态 sxz生效中 yzf已作废 ywc已完成 dqr待确认 ytk已退款")
|
||
channel_agreement_id = Column(String(64), nullable=True, comment="渠道协议ID(预付款/购买订单必填)")
|
||
total_recharge_amount = Column(Numeric(18, 2), nullable=False, default=0, comment="累计充值总额")
|
||
total_refund_amount = Column(Numeric(18, 2), nullable=False, default=0, comment="累计退款总额")
|
||
current_balance = Column(Numeric(18, 2), nullable=False, default=0, comment="当前余额")
|
||
balance_before = Column(Numeric(18, 2), nullable=True, comment="操作前余额快照")
|
||
balance_after = Column(Numeric(18, 2), nullable=True, comment="操作后余额快照")
|
||
finance_submit_by = Column(String(64), nullable=True, comment="发起财务确认人ID")
|
||
finance_submit_time = Column(DateTime, nullable=True, comment="发起财务确认时间")
|
||
finance_submit_remark = Column(String(512), nullable=True, comment="发起财务确认备注")
|
||
finance_submit_attachments = Column(Text, nullable=True, comment="发起财务确认附件(逗号分隔URL)")
|
||
finance_confirm_time = Column(DateTime, nullable=True, comment="财务确认时间")
|
||
finance_confirm_attachments = Column(Text, nullable=True, comment="财务确认附件(逗号分隔URL)")
|
||
finance_remark = Column(String(512), nullable=True, comment="财务确认备注")
|
||
refund_apply_by = Column(String(64), nullable=True, comment="退费申请人ID")
|
||
refund_apply_time = Column(DateTime, nullable=True, comment="退费申请时间")
|
||
refund_amount = Column(Numeric(18, 2), nullable=True, comment="退费金额")
|
||
refund_remark = Column(String(512), nullable=True, comment="退费备注")
|
||
refund_attachments = Column(Text, nullable=True, comment="退费附件(逗号分隔URL)")
|
||
refund_finance_confirm_time = Column(DateTime, nullable=True, comment="退费财务确认时间")
|
||
refund_finance_confirm_attachments = Column(Text, nullable=True, comment="退费财务确认附件")
|
||
refund_finance_remark = 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 BizChannelServiceOrderProduct(Base):
|
||
"""渠道服务订单产品明细 biz_channel_service_order_product"""
|
||
|
||
__tablename__ = "biz_channel_service_order_product"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
service_order_id = Column(String(64), nullable=False, comment="服务订单ID")
|
||
project_code = Column(String(64), nullable=True, comment="项目编码")
|
||
project_name = Column(String(200), nullable=True, comment="项目名称")
|
||
cell_type = Column(String(200), nullable=True, comment="细胞类型")
|
||
spec_text = Column(String(200), nullable=True, comment="规格")
|
||
agreement_unit_price = Column(Numeric(18, 2), nullable=True, comment="协议单价(元)")
|
||
buy_qty = Column(Numeric(18, 4), nullable=True, comment="购买数量")
|
||
buy_amount = Column(Numeric(18, 2), nullable=True, comment="购买金额(元)")
|
||
total_buy_qty = Column(Numeric(18, 4), nullable=False, default=0, comment="累计购买数量")
|
||
total_unsubscribe_qty = Column(Numeric(18, 4), nullable=False, default=0, comment="累计退订数量")
|
||
current_qty = Column(Numeric(18, 4), nullable=False, default=0, comment="当前持有数量")
|
||
total_unsubscribe_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 BizChannelServiceOrderTxn(Base):
|
||
"""渠道服务订单流水 biz_channel_service_order_txn"""
|
||
|
||
__tablename__ = "biz_channel_service_order_txn"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
service_order_id = Column(String(64), nullable=False, comment="关联订单ID")
|
||
txn_type = Column(String(16), nullable=False, comment="recharge/refund/purchase/unsubscribe/settlement")
|
||
amount = Column(Numeric(18, 2), nullable=True, comment="本次操作金额")
|
||
txn_status = Column(String(16), nullable=False, default="dsx", comment="dsx待生效 dqr待财务确认 yqr已确认 yzf已作废")
|
||
products_json = Column(Text, nullable=True, comment="产品明细JSON")
|
||
remark = Column(String(512), nullable=True, comment="备注")
|
||
refund_attachments = Column(Text, nullable=True, comment="退款附件(逗号分隔URL)")
|
||
finance_submit_by = Column(String(64), nullable=True, comment="发起确认人ID")
|
||
finance_submit_time = Column(DateTime, nullable=True, comment="发起确认时间")
|
||
finance_submit_remark = Column(String(512), nullable=True, comment="发起确认备注")
|
||
finance_submit_attachments = Column(Text, nullable=True, comment="发起确认附件")
|
||
finance_confirm_time = Column(DateTime, nullable=True, comment="财务确认时间")
|
||
finance_confirm_by = Column(String(64), nullable=True, comment="财务确认人ID")
|
||
finance_confirm_attachments = Column(Text, nullable=True, comment="财务确认附件")
|
||
finance_remark = Column(String(512), nullable=True, comment="财务确认备注")
|
||
void_by = Column(String(64), nullable=True, comment="作废人ID")
|
||
void_time = Column(DateTime, nullable=True, comment="作废时间")
|
||
balance_before = Column(Numeric(18, 2), nullable=True, comment="操作前余额")
|
||
balance_after = Column(Numeric(18, 2), 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 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="联系人电话")
|
||
institution_logo = Column(String(512), nullable=True, comment="体检机构Logo URL")
|
||
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 BizEquipment(Base):
|
||
"""设备信息 biz_equipment"""
|
||
|
||
__tablename__ = "biz_equipment"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
equipment_code = Column(String(64), nullable=False, comment="设备编码")
|
||
equipment_name = Column(String(100), nullable=False, comment="设备名称")
|
||
equipment_model = Column(String(200), nullable=True, comment="设备型号")
|
||
manufacturer = Column(String(200), nullable=True, comment="厂家")
|
||
purchase_date = Column(Date, nullable=True, comment="购入日期")
|
||
purchase_amount = Column(Numeric(18, 2), nullable=True, comment="购入金额(元)")
|
||
location = Column(String(200), nullable=True, comment="存放位置")
|
||
serial_no = Column(String(100), 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 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_ids = Column(String(1000), nullable=True, comment="关联设备ID(逗号分隔)")
|
||
equipment_name = Column(String(1000), 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-是)")
|
||
equipment_ids = Column(String(1000), nullable=True, comment="默认设备ID(逗号分隔)")
|
||
equipment_name = Column(String(1000), 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 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_ids = Column(String(1000), nullable=True, comment="关联设备ID(逗号分隔)")
|
||
equipment_name = Column(String(1000), 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")
|
||
spec_text = Column(String(200), nullable=True, comment="规格(文本)")
|
||
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=临时, outbound=出库")
|
||
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科研捐赠")
|
||
infusion_schedule_id = Column(String(64), nullable=True, comment="中试输注计划ID(出库生产关联)")
|
||
biz_type = Column(String(20), nullable=True, comment="业务类型: pilot_service=中试服务, clinical_application=临床应用")
|
||
work_order_status = Column(String(16), nullable=False, default="dpz", comment="工单状态 dpz待配置 jxz进行中 ywc已完成 yzf已作废")
|
||
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已完成")
|
||
current_assignee_user_id = Column(String(64), nullable=True, comment="当前负责人用户ID")
|
||
started_time = Column(DateTime, nullable=True, comment="开始时间")
|
||
completed_time = Column(DateTime, nullable=True, comment="完成时间")
|
||
conclusion = Column(String(16), nullable=True, comment="生产结论 cg=成功 sb=失败")
|
||
remark = Column(String(512), nullable=True, comment="备注")
|
||
attachments = Column(String(4000), nullable=True, comment="附件(逗号分隔URL)")
|
||
equipment_ids = Column(String(1000), nullable=True, comment="关联设备ID(逗号分隔)")
|
||
equipment_name = Column(String(1000), 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 BizProductionTaskHandover(Base):
|
||
"""生产任务转发记录 biz_production_task_handover"""
|
||
|
||
__tablename__ = "biz_production_task_handover"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键")
|
||
task_id = Column(String(64), nullable=False, comment="生产任务ID")
|
||
from_user_id = Column(String(64), nullable=False, comment="转出用户ID")
|
||
to_user_id = Column(String(64), nullable=False, comment="接收用户ID")
|
||
handover_time = Column(DateTime, nullable=False, comment="转发时间")
|
||
remark = Column(String(512), nullable=True, comment="转发说明")
|
||
tenant_no = Column(String(64), nullable=False, comment="租户编号")
|
||
order_num = Column(Integer, nullable=True, default=0, 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=True, comment="创建时间")
|
||
update_by = Column(String(64), nullable=True, comment="更新人id")
|
||
update_time = Column(DateTime, nullable=True, 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_ids = Column(String(1000), nullable=True, comment="关联设备ID(逗号分隔)")
|
||
equipment_name = Column(String(1000), 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已完成")
|
||
planned_start_time = Column(DateTime, nullable=True, comment="计划开始时间")
|
||
started_time = Column(DateTime, nullable=True, comment="开始时间")
|
||
completed_time = Column(DateTime, nullable=True, comment="完成时间")
|
||
completed_by = 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 BizProductionTaskStepAssignee(Base):
|
||
"""生产任务步骤负责人 biz_production_task_step_assignee"""
|
||
|
||
__tablename__ = "biz_production_task_step_assignee"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键")
|
||
step_id = Column(String(64), nullable=False, comment="生产任务步骤ID")
|
||
user_id = Column(String(64), nullable=False, comment="负责人用户ID")
|
||
tenant_no = Column(String(64), nullable=False, default="zkxw", comment="租户编号")
|
||
order_num = Column(Integer, nullable=True, default=0, 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="单位")
|
||
requisition_usage_id = Column(String(64), nullable=True, comment="关联领用记录ID")
|
||
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="单位")
|
||
requisition_usage_id = Column(String(64), nullable=True, comment="关联领用记录ID")
|
||
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 BizProductionTaskStepConfiguredReagent(Base):
|
||
"""生产任务步骤配置试剂 biz_production_task_step_configured_reagent"""
|
||
|
||
__tablename__ = "biz_production_task_step_configured_reagent"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
step_id = Column(String(64), nullable=False, comment="步骤ID")
|
||
configured_reagent_code = Column(String(64), nullable=True, comment="配置试剂编码")
|
||
configured_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="单位")
|
||
requisition_usage_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 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="联系电话")
|
||
company_logo = Column(String(512), nullable=True, comment="保险公司Logo URL")
|
||
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="删除标记")
|
||
|
||
|
||
class BizPilotApplication(Base):
|
||
"""渠道中试服务申请单 biz_pilot_application"""
|
||
|
||
__tablename__ = "biz_pilot_application"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
application_no = Column(String(64), nullable=True, comment="申请单号(自动生成,前缀ZSSQ)")
|
||
application_name = Column(String(200), nullable=True, comment="申请单名称")
|
||
project_title = Column(String(200), nullable=True, comment="课题名称(基础实验)")
|
||
customer_name = Column(String(200), nullable=True, comment="客户名称(基础实验)")
|
||
customer_contact = Column(String(100), nullable=True, comment="客户联系人(基础实验)")
|
||
customer_phone = Column(String(32), nullable=True, comment="客户联系方式(基础实验)")
|
||
application_status = Column(String(16), nullable=False, default="dks", comment="dks待开始 jxz进行中 ywc已完成 yzf已作废")
|
||
channel_service_order_id = Column(String(64), nullable=False, comment="渠道服务购买订单ID")
|
||
channel_id = Column(String(64), nullable=True, comment="渠道ID(缓存自服务订单)")
|
||
channel_name = Column(String(200), nullable=True, comment="渠道名称(缓存)")
|
||
biz_type = Column(String(20), nullable=False, default="pilot_service", comment="业务类型: pilot_service=中试服务, clinical_application=临床应用, basic_experiment=基础实验")
|
||
tenant_no = Column(String(64), nullable=False, default="zkxw", comment="租户编号")
|
||
order_num = Column(Integer, nullable=True, comment="排序号")
|
||
remark = Column(String(512), nullable=True, comment="备注")
|
||
consent_form_urls = Column(String(4000), nullable=True, comment="知情同意书附件URL(逗号分隔)")
|
||
attachment_urls = Column(String(4000), nullable=True, comment="其他附件URL(逗号分隔)")
|
||
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 BizPilotPatient(Base):
|
||
"""中试申请单-患者信息 biz_pilot_patient"""
|
||
|
||
__tablename__ = "biz_pilot_patient"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
pilot_application_id = Column(String(64), nullable=False, comment="中试申请单ID")
|
||
customer_id = Column(String(64), nullable=True, comment="关联客户ID")
|
||
patient_name = Column(String(100), nullable=True, comment="姓名")
|
||
sex = Column(String(1), nullable=True, comment="性别")
|
||
age = Column(Integer, nullable=True, comment="年龄")
|
||
id_card_no = Column(String(32), nullable=True, comment="身份证号")
|
||
phone_no = Column(String(32), nullable=True, comment="联系电话")
|
||
emergency_contact = Column(String(100), nullable=True, comment="紧急联系人")
|
||
emergency_phone = Column(String(32), nullable=True, comment="紧急联系人电话")
|
||
clinical_diagnosis = Column(String(2000), nullable=True, comment="临床诊断")
|
||
diagnosis_attachments = Column(String(4000), nullable=True, comment="诊断附件逗号分隔")
|
||
need_checkup = Column(SmallInteger, 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 BizPilotInfusionPlan(Base):
|
||
"""中试申请单-输注方案 biz_pilot_infusion_plan"""
|
||
|
||
__tablename__ = "biz_pilot_infusion_plan"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
pilot_application_id = Column(String(64), nullable=False, comment="中试申请单ID")
|
||
cell_type = Column(String(200), nullable=True, comment="细胞类型")
|
||
spec_text = Column(String(200), nullable=True, comment="规格")
|
||
total_course_count = Column(Integer, nullable=True, comment="总疗程数")
|
||
course_interval = Column(String(200), nullable=True, comment="疗程间隔描述")
|
||
infusion_route = Column(String(200), nullable=True, comment="输注途径")
|
||
infusion_start_date = Column(String(8), nullable=True, comment="输注开始日期YYYYMMDD")
|
||
channel_agreement_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 BizPilotInfusionSchedule(Base):
|
||
"""中试申请单-输注计划 biz_pilot_infusion_schedule"""
|
||
|
||
__tablename__ = "biz_pilot_infusion_schedule"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
infusion_plan_id = Column(String(64), nullable=False, comment="输注方案ID")
|
||
cell_type = Column(String(200), nullable=True, comment="细胞类型")
|
||
spec_text = Column(String(200), nullable=True, comment="规格")
|
||
infusion_time = Column(DateTime, nullable=True, comment="输注时间")
|
||
infusion_location = Column(String(200), nullable=True, comment="输注地点")
|
||
infusion_method = Column(String(32), nullable=True, comment="输注方式(字典szfs)")
|
||
schedule_status = Column(String(16), nullable=False, default="dsc", comment="dsc待生产 ysc已生产 yjf已交付 yqx已取消")
|
||
infusion_status = Column(String(16), nullable=False, default="dtz", comment="dtz待输注 yrqr已用户确认 yqx已取消 ywc已完成")
|
||
cancel_reason = Column(String(512), nullable=True, default=None, comment="取消原因")
|
||
qc_status = Column(String(16), nullable=False, default="dzc", comment="dzc待质检 yzj已质检 yqx已取消")
|
||
amount = Column(Numeric(18, 2), nullable=True, comment="临床应用-手动填写的输注金额(中试为NULL)")
|
||
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 BizPilotInfusionScheduleProduct(Base):
|
||
"""中试申请单-输注计划细胞产品 biz_pilot_infusion_schedule_product"""
|
||
|
||
__tablename__ = "biz_pilot_infusion_schedule_product"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
infusion_schedule_id = Column(String(64), nullable=False, comment="输注计划ID")
|
||
price_id = Column(String(64), nullable=True, comment="协议价格/订单产品引用ID")
|
||
project_code = Column(String(64), nullable=True, comment="项目编码")
|
||
project_name = Column(String(200), nullable=True, comment="项目名称")
|
||
cell_type_name = Column(String(200), nullable=True, comment="细胞类型")
|
||
spec_text = Column(String(200), nullable=True, comment="规格")
|
||
agreement_price = Column(Numeric(18, 2), nullable=True, comment="协议单价(元)")
|
||
actual_price = Column(Numeric(18, 2), nullable=True, comment="实际单价(元)")
|
||
quantity = Column(Integer, nullable=True, default=1, comment="份数")
|
||
product_status = 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 BizPilotCheckup(Base):
|
||
"""中试申请单-体检信息 biz_pilot_checkup"""
|
||
|
||
__tablename__ = "biz_pilot_checkup"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
pilot_application_id = Column(String(64), nullable=False, comment="中试申请单ID")
|
||
pilot_patient_id = Column(String(64), nullable=True, comment="中试患者ID")
|
||
checkup_institution_id = Column(String(64), nullable=True, comment="体检机构ID")
|
||
reserve_time = Column(DateTime, nullable=True, comment="预约时间")
|
||
reserve_fee = Column(Numeric(18, 2), nullable=True, comment="预约费用")
|
||
actual_checkup_time = Column(DateTime, nullable=True, comment="实际体检时间")
|
||
actual_checkup_fee = Column(Numeric(18, 2), nullable=True, comment="实际体检费用")
|
||
fee_settled = Column(SmallInteger, nullable=True, default=0, comment="费用是否结算 1是 0否")
|
||
checkup_status = Column(String(16), nullable=True, default="dtj", comment="dtj待体检 ytj已体检")
|
||
fee_status = Column(String(16), nullable=True, default="wjs", comment="wjs未结算 yjs已结算")
|
||
checkup_remark = Column(String(2000), nullable=True, comment="体检备注")
|
||
report_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 BizPilotCheckupReserveItem(Base):
|
||
"""中试申请单-体检预约项目 biz_pilot_checkup_reserve_item"""
|
||
|
||
__tablename__ = "biz_pilot_checkup_reserve_item"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
pilot_checkup_id = Column(String(64), nullable=False, comment="中试申请单体检信息ID")
|
||
project_name = Column(String(200), nullable=True, 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="删除标记")
|
||
|
||
|
||
class BizPilotCheckupActualItem(Base):
|
||
"""中试申请单-体检实际项目 biz_pilot_checkup_actual_item"""
|
||
|
||
__tablename__ = "biz_pilot_checkup_actual_item"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
pilot_checkup_id = Column(String(64), nullable=False, comment="中试申请单体检信息ID")
|
||
project_name = Column(String(200), nullable=True, 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="删除标记")
|
||
|
||
|
||
class BizPilotDelivery(Base):
|
||
"""中试申请单-交付信息 biz_pilot_delivery"""
|
||
|
||
__tablename__ = "biz_pilot_delivery"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
infusion_schedule_id = Column(String(64), nullable=False, comment="输注计划ID")
|
||
delivery_no = 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 BizPilotDeliveryMaterial(Base):
|
||
"""中试申请单-交付物料 biz_pilot_delivery_material"""
|
||
|
||
__tablename__ = "biz_pilot_delivery_material"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
delivery_id = Column(String(64), nullable=False, comment="交付信息ID")
|
||
material_name = Column(String(200), nullable=False, comment="物料名称")
|
||
qty = Column(Numeric(18, 4), nullable=True, comment="数量")
|
||
unit_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 BizPilotDeliveryMethod(Base):
|
||
"""中试申请单-交付方式 biz_pilot_delivery_method"""
|
||
|
||
__tablename__ = "biz_pilot_delivery_method"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
delivery_id = Column(String(64), nullable=False, comment="交付信息ID")
|
||
delivery_mode = Column(String(16), nullable=False, comment="qdzt渠道自提 kdfh快递发货")
|
||
delivery_attachments = Column(String(4000), nullable=True, comment="交付附件")
|
||
ship_time = Column(DateTime, nullable=True, comment="发运时间")
|
||
handover_temp = Column(String(64), nullable=True, comment="交接温度")
|
||
pickup_person = Column(String(100), nullable=True, comment="自提人员")
|
||
pickup_phone = Column(String(32), nullable=True, comment="联系电话")
|
||
sender_name = Column(String(100), nullable=True, comment="发货人")
|
||
express_company_id = Column(String(64), nullable=True, comment="快递公司ID")
|
||
waybill_no = Column(String(128), nullable=True, comment="快递单号")
|
||
express_fee = Column(Numeric(18, 2), nullable=True, comment="快递费用")
|
||
eta_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 BizPilotInfusionConfirm(Base):
|
||
"""输注计划-应用确认 biz_pilot_infusion_confirm"""
|
||
|
||
__tablename__ = "biz_pilot_infusion_confirm"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
infusion_schedule_id = Column(String(64), nullable=False, comment="输注计划ID")
|
||
confirm_user_id = Column(String(64), nullable=True, comment="确认人")
|
||
confirm_time = Column(DateTime, nullable=True, comment="确认时间")
|
||
confirm_desc = Column(String(2000), 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 BizOutboundReleaseMaterial(Base):
|
||
"""出库放行-出库物料准备主表 biz_outbound_release_material"""
|
||
|
||
__tablename__ = "biz_outbound_release_material"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
infusion_schedule_id = Column(String(64), nullable=False, comment="输注计划ID")
|
||
paper_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 BizOutboundReleaseCell(Base):
|
||
"""出库放行-出库细胞(台账) biz_outbound_release_cell"""
|
||
|
||
__tablename__ = "biz_outbound_release_cell"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
material_id = Column(String(64), nullable=False, comment="出库物料主表ID")
|
||
infusion_schedule_id = Column(String(64), nullable=False, comment="输注计划ID")
|
||
cell_product_id = Column(String(64), nullable=False, comment="细胞产品ID")
|
||
product_code = Column(String(128), nullable=True, comment="产品编码快照")
|
||
product_name = Column(String(200), nullable=True, comment="产品名称快照")
|
||
product_type_name = Column(String(100), nullable=True, comment="产品类型快照")
|
||
spec_name = Column(String(100), nullable=True, comment="规格快照")
|
||
passage = Column(String(32), nullable=True, comment="代次快照")
|
||
batch_no = Column(String(64), nullable=True, comment="批次号快照")
|
||
storage_slot_name = Column(String(200), nullable=True, comment="储物格快照")
|
||
product_status = 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 BizOutboundReleasePaper(Base):
|
||
"""出库放行-其他纸质材料(台账) biz_outbound_release_paper"""
|
||
|
||
__tablename__ = "biz_outbound_release_paper"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
material_id = Column(String(64), nullable=False, comment="出库物料主表ID")
|
||
infusion_schedule_id = Column(String(64), nullable=False, comment="输注计划ID")
|
||
paper_name = Column(String(200), nullable=False, comment="材料名称")
|
||
copies = Column(Integer, nullable=False, default=1, comment="份数")
|
||
attachment_url = Column(String(2000), 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 BizOutboundHandover(Base):
|
||
"""输注计划-出库交接 biz_outbound_handover"""
|
||
|
||
__tablename__ = "biz_outbound_handover"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
infusion_schedule_id = Column(String(64), nullable=False, comment="输注计划ID")
|
||
handover_user_id = Column(String(64), nullable=True, comment="交接人用户ID")
|
||
handover_person = Column(String(64), nullable=True, comment="交接人姓名快照")
|
||
handover_time = Column(DateTime, nullable=True, comment="交接时间")
|
||
handover_location = Column(String(200), nullable=True, comment="交接地点")
|
||
receiver_person = Column(String(200), nullable=True, comment="接收人(文本)")
|
||
cell_purpose = Column(String(200), 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="排序号")
|
||
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 BizOutboundReleaseQcMaterial(Base):
|
||
"""出库放行-质检物料(台账) biz_outbound_release_qc_material"""
|
||
|
||
__tablename__ = "biz_outbound_release_qc_material"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
material_id = Column(String(64), nullable=False, comment="出库物料主表ID")
|
||
infusion_schedule_id = Column(String(64), nullable=False, comment="输注计划ID")
|
||
qc_material_id = Column(String(64), nullable=False, comment="质检物料ID")
|
||
qty = Column(Numeric(18, 4), nullable=False, comment="计划用量")
|
||
material_code = Column(String(64), nullable=True, comment="物料编码快照")
|
||
material_name = Column(String(200), nullable=True, comment="物料名称快照")
|
||
spec_model = Column(String(200), nullable=True, comment="规格型号快照")
|
||
unit = 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 BizOutboundReleaseReview(Base):
|
||
"""出库放行审核 biz_outbound_release_review"""
|
||
|
||
__tablename__ = "biz_outbound_release_review"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
infusion_schedule_id = Column(String(64), nullable=False, comment="输注计划ID")
|
||
production_work_order_id = Column(String(64), nullable=True, comment="生产工单ID")
|
||
qc_work_order_id = Column(String(64), nullable=True, comment="质检工单ID")
|
||
review_conclusion = Column(String(16), nullable=True, comment="tg通过 btg不通过")
|
||
reviewer_user_id = Column(String(64), nullable=True, comment="审核人")
|
||
review_time = Column(DateTime, nullable=True, comment="审核时间")
|
||
review_remark = Column(String(2000), nullable=True, comment="审核备注")
|
||
review_attachments = Column(String(4000), nullable=True, comment="审核附件(逗号分隔URL)")
|
||
review_by_name = 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 BizEnvDetectItem(Base):
|
||
"""环境检测项 biz_env_detect_item"""
|
||
|
||
__tablename__ = "biz_env_detect_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 BizEnvDetectRecord(Base):
|
||
"""环境检测登记 biz_env_detect_record"""
|
||
|
||
__tablename__ = "biz_env_detect_record"
|
||
|
||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||
record_no = Column(String(32), nullable=False, comment="登记编号")
|
||
detect_time = Column(DateTime, nullable=False, comment="检测时间")
|
||
result_time = Column(DateTime, nullable=True, comment="结果时间")
|
||
inspector_ids = Column(String(500), nullable=False, comment="检测人用户ID,逗号分隔")
|
||
inspector_names = Column(String(500), nullable=False, comment="检测人姓名快照,逗号分隔")
|
||
env_detect_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="项目名称快照")
|
||
result_desc = Column(String(2000), nullable=False, comment="检测结果描述")
|
||
attachment_urls = Column(String(2000), 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="删除标记")
|
||
|
||
|
||
from app.models.qc_param import BizQcItemParam, BizQcTaskResult # noqa: E402,F401
|
||
from app.models.qc_material import BizQcMaterial, BizQcMaterialStockBatch, BizQcMaterialUsage # noqa: E402,F401
|
||
from app.models.production_material import ( # noqa: E402,F401
|
||
BizProductionMaterial,
|
||
BizProductionMaterialStockBatch,
|
||
BizProductionMaterialUsage,
|
||
BizProductionMaterialStockCheck,
|
||
BizProductionMaterialStockCheckBatchLine,
|
||
BizProductionMaterialStockCheckUnusedLine,
|
||
)
|
||
from app.models.material import ( # noqa: E402,F401
|
||
BizMaterial,
|
||
BizMaterialStockBatch,
|
||
BizMaterialUsage,
|
||
BizMaterialStockCheck,
|
||
BizMaterialStockCheckBatchLine,
|
||
BizMaterialStockCheckUnusedLine,
|
||
BizMaterialStockLog,
|
||
)
|
||
from app.models.clinical_payment import BizPilotPayment # noqa: E402,F401
|