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.
		
		
		
		
		
			
		
			
				
					
					
						
							216 lines
						
					
					
						
							11 KiB
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							216 lines
						
					
					
						
							11 KiB
						
					
					
				| from datetime import datetime | |
| from sqlalchemy import Column, String, Integer, DateTime, TIMESTAMP, Boolean, func, DECIMAL, Text, Date | |
| 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='标签模版') | |
| #     belt_batch_content = Column(Integer, 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 TaskBizConfigRela(Base): | |
|     """ | |
|     业务域调度配置关联表 ORM 映射类,对应表 t_task_biz_config_rela | |
|     """ | |
|     __tablename__ = "t_task_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 TaskBizConfig(Base): | |
|     __tablename__ = "t_task_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="更新时间") | |
|     status = Column(String(10), nullable=False, default="OFFLINE", comment="状态") | |
|     ds_time = Column(DateTime, nullable=True, comment="调度时间") | |
|     ds_ids = Column(String(50), nullable=True, comment="任务ID") | |
|     schId = Column(String(50), nullable=True, comment="调度id") | |
| 
 | |
| 
 | |
| 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="正则表达式") | |
|     ssys_id = Column(Integer, nullable=True) | |
|     mdl_name = Column(String(50), nullable=True) | |
|     ratio = Column(DECIMAL(10, 4), nullable=True) | |
|     upd_by = Column(String(50), nullable=True) | |
|     upd_time = Column(DateTime, nullable=True, comment='更新时间') | |
| 
 | |
| 
 | |
| class BatchDataopLabelConfig(Base): | |
|     """ | |
|     批处理数据操作标签配置表 ORM 映射类,对应表 t_batch_dataop_label_config | |
|     """ | |
|     __tablename__ = "t_batch_dataoptype_label_config" | |
| 
 | |
|     onum = Column(Integer, primary_key=True, autoincrement=True, comment="唯一编号") | |
|     op_type = Column(String(50), nullable=True, comment="唯一类型,忽略类型") | |
|     col_type = Column(String(50), nullable=True, comment="字段类型") | |
|     col_attr = Column(String(50), nullable=True, comment="字段属性") | |
|     ratio = Column(DECIMAL(10, 4), nullable=True, comment="阈值") | |
|     ssys_id = Column(Integer, nullable=True) | |
|     mdl_name = Column(String(50), nullable=True) | |
|     upd_by = Column(String(50), nullable=True) | |
|     upd_time = Column(DateTime, nullable=True, comment='更新时间') | |
| 
 | |
| 
 | |
| 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="比率") | |
|     ssys_id = Column(Integer, nullable=True) | |
|     mdl_name = Column(String(50), nullable=True) | |
|     upd_by = Column(String(50), nullable=True) | |
|     upd_time = Column(DateTime, nullable=True, comment='更新时间') | |
| 
 | |
| 
 | |
| class BatchTableRelaLabelConfig(Base): | |
|     """ | |
|     批处理字段类型标签配置表 ORM 映射类,对应表 t_batch_datatype_label_config | |
|     """ | |
|     __tablename__ = "t_batch_tab_rela_label_config" | |
| 
 | |
|     onum = Column(Integer, primary_key=True, autoincrement=True, comment="唯一编号") | |
|     rela_type = Column(String(100), nullable=True, comment="字段类型") | |
|     ratio = Column(DECIMAL(10, 4), nullable=True, comment="比率") | |
|     a_ssys_id = Column(Integer, nullable=True) | |
|     a_mdl_name = Column(String(50), nullable=True) | |
|     b_ssys_id = Column(Integer, nullable=True) | |
|     b_mdl_name = Column(String(50), nullable=True) | |
|     upd_by = Column(String(50), nullable=True) | |
|     upd_time = Column(DateTime, nullable=True, comment='更新时间') | |
| 
 | |
| 
 | |
| class DatasecConfig(Base): | |
|     """ | |
|     数据安全参数配置 ORM 映射类,对应表 t_datasec_config | |
|     """ | |
|     __tablename__ = "t_datasec_config" | |
| 
 | |
|     onum = Column(Integer, primary_key=True, autoincrement=True, comment="任务主键") | |
|     metatask_name = Column(String(50), nullable=False, default="", comment="任务名称") | |
|     create_by = Column(String(64), nullable=False, default="", comment="创建者") | |
|     create_time = Column(DateTime, nullable=True, comment="创建时间") | |
|     update_by = Column(String(64), nullable=True, default="", comment="更新者") | |
|     update_time = Column(DateTime, nullable=True, comment="更新时间") | |
|     metatask_param = Column(String(500), nullable=True, comment="参数") | |
|     status = Column(String(10), nullable=True, default='OFFLINE', comment='状态') | |
|     ds_time = Column(DateTime, nullable=True, comment="调度时间") | |
|     ds_ids = Column(String(50), nullable=True, comment="任务ID") | |
|     schId = Column(String(50), nullable=True, comment="调度id") | |
| 
 | |
| class DataAstContent(Base): | |
|     __tablename__ = "t_batch_content" | |
| 
 | |
|     content_onum = Column(Integer, primary_key=True, autoincrement=True, comment='目录序号') | |
|     content_name = Column(String(255), nullable=False, comment='目录名称') | |
|     content_stat = Column(String(10), nullable=False, comment='目录状态(有效/废弃/停用)') | |
|     content_intr = Column(Text, comment='目录简介') | |
|     content_pic = Column(String(255), comment='目录负责人') | |
|     supr_content_onum = Column(Integer, comment='上级目录序号') | |
|     leaf_node_flag = Column(Integer, default=1, comment='叶子节点标志') | |
|     upd_prsn = Column(String(255), nullable=False, comment='更新人员') | |
|     upd_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='更新时间') | |
| 
 | |
| 
 | |
| class DataAstContentRela(Base): | |
|     __tablename__ = "t_batch_content_rela" | |
| 
 | |
| 
 | |
|     rela_onum = Column(Integer, primary_key=True, autoincrement=True, comment='关系序号') | |
|     content_onum = Column(Integer, nullable=False, comment='目录序号') | |
|     ast_onum = Column(Integer, nullable=False, comment='资产序号') | |
|     rela_type = Column(String(50), default='归属关系', comment='关系类型') | |
|     rela_eff_begn_date = Column(Date, nullable=True, comment='关系生效开始日期') | |
|     rela_eff_end_date = Column(Date, nullable=True, comment='关系生效结束日期') | |
|     upd_prsn = Column(String(255), nullable=False, comment='更新人员') | |
|     rela_status = Column(String(18), nullable=True, comment='关系状态') |