|
|
|
from datetime import datetime
|
|
|
|
from sqlalchemy import Column, String, Integer, DateTime, TIMESTAMP,Boolean, func
|
|
|
|
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 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="更新时间")
|