Skip to content

Commit

Permalink
feat: avatar on team and agent
Browse files Browse the repository at this point in the history
  • Loading branch information
Chkhikvadze committed Sep 19, 2023
1 parent 872907c commit f9eb5f0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions apps/server/models/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions apps/server/models/team.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions apps/server/typings/team.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
3 changes: 2 additions & 1 deletion apps/server/typings/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f9eb5f0

Please sign in to comment.