Program/mooc/models/admin.py

25 lines
955 B
Python
Raw Normal View History

2024-12-31 22:27:04 +08:00
from sqlalchemy import Column, Integer, String, Text, SmallInteger
from sqlalchemy.sql import func
import time
from mooc.db.database import Base
class Admin(Base):
__tablename__ = "ims_goouc_fullexam_admin"
id = Column(Integer, primary_key=True, autoincrement=True)
weid = Column(String(150), nullable=False)
username = Column(String(255), nullable=False)
password = Column(String(255), nullable=False)
createtime = Column(Integer, nullable=False, default=lambda: int(time.time()))
logintime = Column(Integer, nullable=False, default=lambda: int(time.time()))
is_delete = Column(SmallInteger, nullable=False, default=1, comment='0正常 1禁用')
pcate_id = Column(Integer, nullable=False, comment='一级类目id')
cate_id = Column(Integer, nullable=False, comment='二级级类目id')
relation_id = Column(Text, nullable=False, comment='关联试卷ID')
class Config:
2025-01-03 14:37:35 +08:00
from_attributes = True
2024-12-31 22:27:04 +08:00