from sqlalchemy import Column, Integer, String, DateTime from config.database import Base from datetime import datetime class SysDscatalog(Base): """ 数据标准管理表 """ __tablename__ = 'sys_dscatalog' dscatalog_id = Column(Integer, primary_key=True, autoincrement=True, comment='数据标准ID') dscatalog_parent_id = Column(Integer, default=0, comment='父标准ID') dscatalog_ancestors = Column(String(50), nullable=True, default='', comment='祖级列表') dscatalog_name = Column(String(30), nullable=True, default='', comment='数据标准名称') dscatalog_remark = Column(String(225), nullable=True, default='', comment='数据标准说明') dscatalog_order_num = Column(Integer, default=0, comment='排序编号') status = Column(String(1), nullable=True, default=0, comment='标准状态(0正常 1停用)') del_flag = Column(String(1), nullable=True, default=0, comment='删除标志(0代表存在 2代表删除)') dscatalog_area = Column(String(50), nullable=True, default='', comment='标准层级') create_by = Column(String(64), nullable=True, default='', comment='创建者') create_time = Column(DateTime, nullable=True, default=datetime.now(), comment='创建时间') update_by = Column(String(64), nullable=True, default='', comment='更新者') update_time = Column(DateTime, nullable=True, default=datetime.now(), comment='更新时间')