This commit is contained in:
qiangyanwen 2022-12-06 11:22:42 +08:00
parent c9b00a4f2e
commit 0b51a76089
1 changed files with 3 additions and 2 deletions

View File

@ -17,9 +17,10 @@ class User(DatabaseModel):
username = Column(String(16), unique=True, index=True, comment="用户名") username = Column(String(16), unique=True, index=True, comment="用户名")
password = Column(String(64), unique=False, comment="密码") password = Column(String(64), unique=False, comment="密码")
email = Column(String(64), unique=True, nullable=False, comment="邮箱") email = Column(String(64), unique=True, nullable=False, comment="邮箱")
created_time = Column(DATETIME,comment='创建时间') created_time = Column(DATETIME, comment='创建时间')
deleted_time = Column(DATETIME,comment="更新时间") deleted_time = Column(DATETIME, comment="更新时间")
__table_args__ = ({'comment': '用户表'}) __table_args__ = ({'comment': '用户表'})
def __init__(self, username, password, email): def __init__(self, username, password, email):
self.username = username self.username = username
self.password = password self.password = password