xiaozhi-esp32-server/web/api/db/models.py
2025-03-03 17:26:05 +08:00

13 lines
516 B
Python

# web/db/models.py
from sqlalchemy import Column, Integer, String, Boolean
from web.api.db.database import Base
class User(Base):
__tablename__ = "users"
id = Column(Integer, primary_key=True, index=True)
username = Column(String(50), unique=True, index=True, nullable=False)
email = Column(String(100), unique=True, index=True, nullable=True)
full_name = Column(String(100), nullable=True)
hashed_password = Column(String, nullable=False)
disabled = Column(Boolean, default=False)