2026-03-13 14:10:13 +08:00
|
|
|
from __future__ import annotations
|
|
|
|
|
|
2026-03-23 01:20:27 +08:00
|
|
|
from datetime import datetime
|
2026-03-23 14:25:47 +08:00
|
|
|
from typing import ClassVar, Literal
|
2026-03-23 01:20:27 +08:00
|
|
|
from uuid import UUID
|
2026-03-13 14:10:13 +08:00
|
|
|
|
2026-03-23 14:25:47 +08:00
|
|
|
from pydantic import BaseModel, ConfigDict
|
2026-03-25 12:36:31 +08:00
|
|
|
from schemas.domain.memory_content import (
|
2026-03-23 14:25:47 +08:00
|
|
|
TeamMember,
|
|
|
|
|
UserMemoryContent,
|
|
|
|
|
UserPreferences,
|
|
|
|
|
WorkHabit,
|
|
|
|
|
WorkProfileContent,
|
|
|
|
|
WorkProject,
|
|
|
|
|
)
|
2026-03-25 12:36:31 +08:00
|
|
|
from schemas.enums import MemoryStatus, MemoryType
|
2026-03-23 01:20:27 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class MemoryModel(BaseModel):
|
|
|
|
|
model_config: ClassVar[ConfigDict] = ConfigDict(
|
|
|
|
|
extra="forbid", from_attributes=True
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
id: UUID
|
|
|
|
|
owner_id: UUID
|
|
|
|
|
memory_type: Literal["user", "work"]
|
2026-03-23 14:25:47 +08:00
|
|
|
content: UserMemoryContent | WorkProfileContent
|
2026-03-23 01:20:27 +08:00
|
|
|
status: MemoryStatus
|
|
|
|
|
created_at: datetime
|
|
|
|
|
updated_at: datetime
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
__all__ = [
|
|
|
|
|
"MemoryModel",
|
|
|
|
|
"MemoryStatus",
|
|
|
|
|
"MemoryType",
|
2026-03-23 14:25:47 +08:00
|
|
|
"TeamMember",
|
|
|
|
|
"UserMemoryContent",
|
|
|
|
|
"UserPreferences",
|
|
|
|
|
"WorkHabit",
|
|
|
|
|
"WorkProfileContent",
|
|
|
|
|
"WorkProject",
|
2026-03-23 01:20:27 +08:00
|
|
|
]
|