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