diff --git a/src/fabledassistant/models/note.py b/src/fabledassistant/models/note.py index dfce1b3..048a8b0 100644 --- a/src/fabledassistant/models/note.py +++ b/src/fabledassistant/models/note.py @@ -60,6 +60,10 @@ class Note(Base, TimestampMixin): # Structured metadata for entity types (person/place/list) # Named 'entity_meta' to avoid collision with SQLAlchemy's reserved 'metadata' attribute entity_meta: Mapped[dict | None] = mapped_column("metadata", JSONB, nullable=True) + # Task sub-kind — 'work' (default) or 'plan'. Only meaningful when the note + # is a task (status is not None); ordinary notes keep the 'work' default and + # ignore it. Orthogonal to note_type (which is the note/entity axis). + task_kind: Mapped[str] = mapped_column(Text, default="work", server_default="work") __table_args__ = ( Index("ix_notes_tags", "tags", postgresql_using="gin"), @@ -106,6 +110,7 @@ class Note(Base, TimestampMixin): ), "is_task": self.is_task, "note_type": self.entity_type, + "task_kind": self.task_kind, "metadata": self.entity_meta or {}, "created_at": self.created_at.isoformat(), "updated_at": self.updated_at.isoformat(),