- Fix delete agent 500: clean up FK records (agent_llm_logs, permissions, schedules, executions, team_members) and unbind goals/tasks before delete - Remove hardcoded personality templates in Android, replace with dynamic system prompt generation from name + description - Set promptSectionsEnabled=false to bypass PromptComposer for personality - Add Tencent Cloud Linux deployment guide (Docker Compose) - Accumulated backend service updates, frontend UI fixes, Android app changes Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
19 lines
837 B
Python
19 lines
837 B
Python
"""浏览器推送订阅模型"""
|
|
from sqlalchemy import Column, String, Text, DateTime, func, JSON
|
|
from sqlalchemy.dialects.mysql import CHAR
|
|
from app.core.database import Base
|
|
import uuid
|
|
|
|
|
|
class PushSubscription(Base):
|
|
__tablename__ = "push_subscriptions"
|
|
|
|
id = Column(CHAR(36), primary_key=True, default=lambda: str(uuid.uuid4()))
|
|
user_id = Column(CHAR(36), nullable=True, index=True, comment="关联用户ID")
|
|
endpoint = Column(Text, nullable=False, comment="推送端点URL")
|
|
p256dh = Column(Text, nullable=False, comment="公钥")
|
|
auth = Column(Text, nullable=False, comment="认证密钥")
|
|
user_agent = Column(String(500), nullable=True, comment="设备UA")
|
|
created_at = Column(DateTime, server_default=func.now())
|
|
updated_at = Column(DateTime, server_default=func.now(), onupdate=func.now())
|