mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-29 05:09:46 +01:00
13 lines
512 B
Python
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)
|