xiaozhi-esp32-server/web/api/db/models.py
kalicyh c81b6b6527 🦄 refactor: 重写前端
路由守护尚未写完
2025-03-03 09:12:33 +08:00

13 lines
512 B
Python

# api/db/models.py
from sqlalchemy import Column, Integer, String, Boolean
from 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)