1234567891011121314151617 |
- from sqlalchemy import Column, Integer, Text, BigInteger, String, SmallInteger, Boolean, TIMESTAMP
- from sqlalchemy.ext.declarative import declarative_base
- Base = declarative_base()
- class DatasetModule(Base):
- __tablename__ = "dataset_module"
- id = Column(BigInteger, primary_key=True, autoincrement=True, comment="主键id")
- dataset_id = Column(BigInteger, nullable=False, comment="数据集id")
- module_id = Column(BigInteger, nullable=False, comment="模型id")
- is_default = Column(Integer, nullable=False, default=0, comment="是否为该模块的默认数据集")
- is_delete = Column(Integer, nullable=False, default=0, comment="是否删除 1-删除 0-未删除")
- create_time = Column(TIMESTAMP, nullable=False, server_default="CURRENT_TIMESTAMP", comment="创建时间")
- update_time = Column(TIMESTAMP, nullable=False, server_default="CURRENT_TIMESTAMP", onupdate="CURRENT_TIMESTAMP",
- comment="更新时间")
|