16 lines
615 B
Python
16 lines
615 B
Python
from sqlalchemy import Column, String, Boolean, JSON
|
|
from app.models.base import BaseModel
|
|
|
|
|
|
class User(BaseModel):
|
|
__tablename__ = "users"
|
|
|
|
email = Column(String(255), unique=True, nullable=False, index=True)
|
|
hashed_password = Column(String(255), nullable=False)
|
|
full_name = Column(String(255), nullable=True)
|
|
is_active = Column(Boolean, default=True, nullable=False)
|
|
is_superuser = Column(Boolean, default=False, nullable=False)
|
|
# 用户级配置
|
|
llm_config = Column(JSON, nullable=True) # LLM 模型配置
|
|
scheduler_config = Column(JSON, nullable=True) # 定时任务配置
|