diff --git a/src/data/models/chat.py b/src/data/models/chat.py index 38e709d..4f0895b 100644 --- a/src/data/models/chat.py +++ b/src/data/models/chat.py @@ -1,10 +1,14 @@ from datetime import datetime -from sqlalchemy import Column, DateTime, ForeignKey, String, UUID, func +from sqlalchemy import Column, DateTime, Enum, ForeignKey, String, UUID, func from sqlalchemy.orm import relationship from src.data.db import Base +class ChatState(Enum): + ACTIVE = "active" + INACTIVE = "inactive" + class Chat(Base): __tablename__ = "chats" id = Column( @@ -12,6 +16,7 @@ class Chat(Base): ) title = Column(String, nullable=False) profile_id = Column(UUID(as_uuid=True), ForeignKey("profiles.id")) + state = Column(ChatState, nullable=False, default="active") created_at = Column(DateTime, default=datetime.utcnow) def __repr__(self): diff --git a/src/resolvers/focus.py b/src/resolvers/focus.py index df3eed9..6259d3c 100644 --- a/src/resolvers/focus.py +++ b/src/resolvers/focus.py @@ -65,6 +65,7 @@ class FocusItemTaskSize(Enum): @strawberry.type class FocusOutputItem: + id: str text: str type: str task_size: str @@ -82,6 +83,7 @@ class FocusOutput: def convert_to_sherpa_items(items: List[Focus]) -> List[FocusOutputItem]: return [ FocusOutputItem( + id=data.id, type=data.type, task_size=data.task_size, text=data.text,