Files
aiagent/backend/app/models/fcm_token.py
renjianbo beff3fac8d fix: delete agent 500 error + dynamic personality + deployment guide
- 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>
2026-06-29 01:17:21 +08:00

19 lines
864 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""FCM / 设备推送 Token 模型"""
from sqlalchemy import Column, String, DateTime, func
from sqlalchemy.dialects.mysql import CHAR
from app.core.database import Base
import uuid
class FcmToken(Base):
"""设备推送 TokenFirebase Cloud Messaging / APNs"""
__tablename__ = "fcm_tokens"
id = Column(CHAR(36), primary_key=True, default=lambda: str(uuid.uuid4()))
user_id = Column(CHAR(36), nullable=False, index=True, comment="关联用户ID")
token = Column(String(512), nullable=False, unique=True, comment="FCM/APNs 设备令牌")
platform = Column(String(16), nullable=False, default="android", comment="android / ios / web")
created_at = Column(DateTime, server_default=func.now(), comment="注册时间")
last_used_at = Column(DateTime, server_default=func.now(), onupdate=func.now(), comment="最后推送时间")