add test
This commit is contained in:
parent
b2777663ba
commit
99b9c47b78
|
|
@ -4,7 +4,7 @@
|
||||||
# @Author :qiangyanwen
|
# @Author :qiangyanwen
|
||||||
# @File :model.py
|
# @File :model.py
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from sqlalchemy import Column, INT, String, DATETIME,Integer
|
from sqlalchemy import Column, INT, String, DATETIME, Integer
|
||||||
from config.database import DatabaseModel
|
from config.database import DatabaseModel
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -17,12 +17,12 @@ class User(DatabaseModel):
|
||||||
username = Column(String(16), unique=True, index=True, comment="用户名")
|
username = Column(String(16), unique=True, index=True, comment="用户名")
|
||||||
password = Column(String(256), comment="密码")
|
password = Column(String(256), comment="密码")
|
||||||
email = Column(String(64), unique=True, nullable=False, comment="邮箱")
|
email = Column(String(64), unique=True, nullable=False, comment="邮箱")
|
||||||
status = Column(Integer,nullable=False,comment="用户状态,0是禁用1是启用",default=1)
|
status = Column(Integer, nullable=False, comment="用户状态,0是禁用1是启用", default=1)
|
||||||
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,status):
|
def __init__(self, username, password, email, status):
|
||||||
self.username = username
|
self.username = username
|
||||||
self.password = password
|
self.password = password
|
||||||
self.email = email
|
self.email = email
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue