diff --git a/apps/server/models/agent.py b/apps/server/models/agent.py index 719b628ef..0135606af 100644 --- a/apps/server/models/agent.py +++ b/apps/server/models/agent.py @@ -33,6 +33,7 @@ class AgentModel(BaseModel): __tablename__ = 'agent' id = Column(UUID, primary_key=True, index=True, default=uuid.uuid4) name = Column(String) + avatar = Column(String(300), default=None) role = Column(String) parent_id = Column(UUID, ForeignKey('agent.id', ondelete='CASCADE'), nullable=True, index=True) workspace_id = Column(UUID, ForeignKey('workspace.id', ondelete='CASCADE'), nullable=True, index=True) diff --git a/apps/server/models/team.py b/apps/server/models/team.py index 5a8d9ab99..199bcaa93 100644 --- a/apps/server/models/team.py +++ b/apps/server/models/team.py @@ -25,6 +25,7 @@ class TeamModel(BaseModel): id = Column(UUID, primary_key=True, index=True, default=uuid.uuid4) name = Column(String) + avatar = Column(String(300), default=None) team_type = Column(String) #todo replace as enum (Debates, Plan_Execute, Authoritarian_Speaker, Decentralized_speaker) description = Column(String, nullable=True) is_deleted = Column(Boolean, default=False, index=True) diff --git a/apps/server/typings/team.py b/apps/server/typings/team.py index b51cc5a25..815024ae8 100644 --- a/apps/server/typings/team.py +++ b/apps/server/typings/team.py @@ -36,6 +36,7 @@ class TeamOutput(BaseModel): creator: Optional[UserOutput] modified_by: Optional[UUID4] team_agents: Optional[List[TeamAgentOutput]] + avatar: Optional[str] class QueryParams(BaseModel): id: Optional[str] diff --git a/apps/server/typings/user.py b/apps/server/typings/user.py index 559448828..33d633b81 100644 --- a/apps/server/typings/user.py +++ b/apps/server/typings/user.py @@ -10,7 +10,8 @@ class UserOutput(BaseModel): id: UUID4 name: str email: str - avatar: str + avatar: Optional[str] + @strawberry.type class User: id: strawberry.ID