first commit

This commit is contained in:
2026-04-07 16:05:05 +08:00
commit 9d9bdbb1ce
136 changed files with 5103 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
from .base import BaseModel
from . import db
class Memory(BaseModel):
__tablename__ = "memories"
workspace_id = db.Column(
db.BigInteger,
db.ForeignKey("workspaces.id"),
nullable=False,
comment="工作空间ID",
)
agent_id = db.Column(
db.BigInteger, db.ForeignKey("agents.id"), nullable=True, comment="Agent ID"
)
type = db.Column(
db.String(50), nullable=False, comment="类型(profile, memory, note"
)
content = db.Column(db.Text, nullable=False, comment="内容")
tags = db.Column(db.JSON, nullable=True, comment="标签")
importance = db.Column(
db.Integer, default=5, nullable=False, comment="重要性(1-10"
)