users.py 584 B

123456789101112131415161718192021
  1. from sqlalchemy import Boolean, Column, ForeignKey, Integer, String
  2. from app.models.database import BaseModel
  3. class Users(BaseModel):
  4. __tablename__ = "users"
  5. id = Column(Integer, primary_key=True, index=True)
  6. # 姓名
  7. name = Column(String, nullable=False)
  8. # 用户编码
  9. code = Column(String, nullable=False)
  10. # 用户名称
  11. username = Column(String, nullable=False)
  12. # 密码暗文
  13. password = Column(String, nullable=False)
  14. # 创建时间
  15. create_time = Column(Integer, nullable=False)
  16. # user_token
  17. user_token = Column(String)