You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

112 lines
6.0 KiB

from datetime import datetime
from sqlalchemy import Column, String, Integer, DateTime, TIMESTAMP,Boolean, func,DECIMAL
from config.database import Base
# class MetadataClas(Base):
# """
# 标签信息表
# """
# __tablename__ = 't_metadata_clas'
# clas_onum = Column(Integer, primary_key=True, default=0, comment='标签序号')
# clas_pri_clas = Column(String(50), default=None, comment='标签一级分类')
# clas_scd_clas = Column(String(50), default=None, comment='标签二级分类')
# clas_thre_clas = Column(String(50), default=None, comment='标签三级分类')
# clas_name = Column(String(200), default=None, comment='标签名称')
# clas_tmpl = Column(String(200), default=None, comment='标签模版')
# clas_eff_flag = Column(String(1), default=None, comment='标签有效标志')
# rec_subm_prsn = Column(String(64), default=None, comment='记录提交人')
# upd_time = Column(TIMESTAMP, default=func.now(), onupdate=func.now(), nullable=True, comment='更新时间')
class MetadataSec(Base):
"""
数据安全配置表
"""
__tablename__ = 't_metadata_sec'
onum = Column(String(36), primary_key=True, comment='唯一编号')
sec_eff_flag = Column(String(1), default=None, comment='有效标志')
rec_subm_prsn = Column(String(64), default=None, comment='记录提交人')
upd_time = Column(TIMESTAMP, default=func.now(), onupdate=func.now(), nullable=True, comment='更新时间')
sec_level_name = Column(String(50), default=None, comment='等级名称')
sec_level_desc = Column(String(200), default=None, comment='等级说明')
sec_level_summary = Column(String(200), comment='等级简介')
class SecuBizConfigRela(Base):
"""
业务域配置关联表 ORM 映射类,对应表 t_secu_biz_config_rela
"""
__tablename__ = "t_secu_biz_config_rela"
onum = Column(Integer, primary_key=True, autoincrement=True, comment="序号")
biz_onum = Column(Integer, nullable=True, comment="业务域id")
tab_onum = Column(Integer, nullable=True, comment="表id")
create_by = Column(String(20), nullable=True, comment="创建者")
create_time = Column(DateTime, nullable=True, comment="创建时间")
class SecuBizPermiConfig(Base):
__tablename__ = "t_secu_biz_permi_config"
onum = Column(Integer, primary_key=True, autoincrement=True, comment="序号")
biz_onum = Column(Integer, nullable=True, comment="业务域的序号,可关联业务域定义表")
obj_type = Column(String(1), nullable=True, comment="对象类型(0:角色 1:用户)")
obj_value = Column(String(50), nullable=True, comment="角色值")
obj_name = Column(String(50), nullable=True, comment="角色值")
isStop = Column(Boolean, nullable=True, comment="是否停用(0:运行 1:停用)")
create_by = Column(String(20), nullable=True, comment="创建者")
create_time = Column(DateTime, nullable=True, comment="创建时间")
update_by = Column(String(20), nullable=True, comment="更新者")
update_time = Column(DateTime, nullable=True, comment="更新时间")
class SecuBizConfig(Base):
__tablename__ = "t_secu_biz_config"
onum = Column(Integer, primary_key=True, autoincrement=True, comment="序号")
biz_name = Column(String(255), nullable=True, comment="业务域名称") # 这里你给的是int,实际是否应该varchar?
risk_lvl = Column(String(50), nullable=True, comment="可关联安全等级序号")
isStop = Column(Boolean, nullable=True, comment="是否停用(0:运行 1:停用)")
create_by = Column(String(20), nullable=True, comment="创建者")
create_time = Column(DateTime, nullable=True, comment="创建时间")
update_by = Column(String(20), nullable=True, comment="更新者")
update_time = Column(DateTime, nullable=True, comment="更新时间")
class BatchBusiLabelConfig(Base):
"""
批处理业务标签配置表 ORM 映射类,对应表 t_batch_busi_label_config
"""
__tablename__ = "t_batch_busi_label_config"
onum = Column(Integer, primary_key=True, autoincrement=True, comment="唯一编号")
regex_name = Column(String(255), nullable=True, comment="正则表达式名称")
regex_pattern = Column(String(255), nullable=True, comment="正则表达式")
upd_time = Column(DateTime, nullable=True, comment="更新时间")
ssys_cd = Column(String(50), nullable=True)
mdl_name = Column(String(50), nullable=True)
ratio = Column(DECIMAL(10, 4), nullable=True)
class BatchDataopLabelConfig(Base):
"""
批处理数据操作标签配置表 ORM 映射类,对应表 t_batch_dataop_label_config
"""
__tablename__ = "t_batch_dataop_label_config"
onum = Column(Integer, primary_key=True, autoincrement=True, comment="唯一编号")
optype = Column(String(50), nullable=True, comment="唯一类型,忽略类型")
config1 = Column(DECIMAL(10, 4), nullable=True, comment="参数1")
config2 = Column(DECIMAL(10, 4), nullable=True, comment="参数2")
config3 = Column(DECIMAL(10, 4), nullable=True, comment="参数3")
config4 = Column(DECIMAL(10, 4), nullable=True, comment="参数4")
config5 = Column(DECIMAL(10, 4), nullable=True, comment="参数5")
config6 = Column(DECIMAL(10, 4), nullable=True, comment="参数6")
config7 = Column(DECIMAL(10, 4), nullable=True, comment="参数7")
ssys_cd = Column(String(50), nullable=True)
mdl_name = Column(String(50), nullable=True)
class BatchDatatypeLabelConfig(Base):
"""
批处理字段类型标签配置表 ORM 映射类,对应表 t_batch_datatype_label_config
"""
__tablename__ = "t_batch_datatype_label_config"
onum = Column(Integer, primary_key=True, autoincrement=True, comment="唯一编号")
datatype = Column(String(100), nullable=True, comment="字段类型")
ratio = Column(DECIMAL(10, 4), nullable=True, comment="比率")
upd_time = Column(DateTime, nullable=True, comment="更新时间")
ssys_cd = Column(String(50), nullable=True)
mdl_name = Column(String(50), nullable=True)