初始化
This commit is contained in:
15
app/models/account.py
Normal file
15
app/models/account.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from sqlalchemy import Column, Integer, String, Boolean, DateTime
|
||||
from sqlalchemy.sql import func
|
||||
from ..core.database import Base
|
||||
|
||||
class Account(Base):
|
||||
__tablename__ = "accounts"
|
||||
|
||||
id = Column(Integer, primary_key=True, index=True, autoincrement=True)
|
||||
account = Column(String(50), unique=True, index=True, nullable=False, comment="账号")
|
||||
password = Column(String(100), nullable=False, comment="密码")
|
||||
status = Column(Integer, default=1, comment="状态: 1-正常, 0-禁用")
|
||||
today_updated = Column(Integer, default=0, comment="是否更新")
|
||||
section = Column(String(100), comment="标段")
|
||||
created_at = Column(DateTime, server_default=func.now(), comment="创建时间")
|
||||
updated_at = Column(DateTime, server_default=func.now(), onupdate=func.now(), comment="更新时间")
|
||||
Reference in New Issue
Block a user