feat: 重构 memory 系统,支持 user memory 和 work memory 分离
This commit is contained in:
@@ -32,6 +32,10 @@ class AutomationJob(TimestampMixin, SoftDeleteMixin, Base):
|
||||
UUID(as_uuid=True),
|
||||
nullable=False,
|
||||
)
|
||||
bootstrap_key: Mapped[str | None] = mapped_column(
|
||||
String(64),
|
||||
nullable=True,
|
||||
)
|
||||
title: Mapped[str] = mapped_column(
|
||||
String(255),
|
||||
nullable=False,
|
||||
|
||||
@@ -16,12 +16,6 @@ class MemoryType(str, Enum):
|
||||
WORK = "work"
|
||||
|
||||
|
||||
class MemorySource(str, Enum):
|
||||
MANUAL = "manual"
|
||||
AGENT = "agent"
|
||||
IMPORTED = "imported"
|
||||
|
||||
|
||||
class MemoryStatus(str, Enum):
|
||||
ACTIVE = "active"
|
||||
DISABLED = "disabled"
|
||||
@@ -46,15 +40,10 @@ class Memory(TimestampMixin, Base):
|
||||
String(20),
|
||||
nullable=False,
|
||||
)
|
||||
title: Mapped[str | None] = mapped_column(String(255), nullable=True)
|
||||
content: Mapped[dict] = mapped_column(
|
||||
json_jsonb,
|
||||
nullable=False,
|
||||
)
|
||||
source: Mapped[MemorySource] = mapped_column(
|
||||
String(20),
|
||||
nullable=False,
|
||||
)
|
||||
status: Mapped[MemoryStatus] = mapped_column(
|
||||
String(20),
|
||||
nullable=False,
|
||||
|
||||
Reference in New Issue
Block a user