Skip to content

Commit b3efcc9

Browse files
committed
delete likeCount and popularity
1 parent ac3dd73 commit b3efcc9

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

backend/app/models.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,13 @@ class CharacterBase(SQLModel):
132132
scenario: str | None = Field(default=None, max_length=2000)
133133
category: str | None = Field(default=None, max_length=255)
134134
greeting: str | None = Field(default=None, max_length=1000)
135+
135136
voice_id: str | None = Field(default=None, max_length=255)
136137
language: str | None = Field(default=None, max_length=50)
137138
tags: list[str] | None = Field(default=None)
138139
popularity_score: float | None = Field(default=None)
139140
is_featured: bool = Field(default=False)
141+
140142
created_at: datetime = Field(default_factory=datetime.utcnow)
141143

142144

@@ -164,10 +166,9 @@ class CharacterUpdate(CharacterBase):
164166
voice_id: str | None = Field(default=None, max_length=255)
165167
language: str | None = Field(default=None, max_length=50)
166168
tags: list[str] | None = Field(default=None)
167-
popularity_score: float | None = Field(default=0.0)
169+
168170
is_featured: bool = Field(default=False)
169171
created_at: datetime | None = None
170-
171172
status: CharacterStatus | None = None
172173

173174

@@ -176,11 +177,11 @@ class Character(CharacterBase, table=True):
176177
id: uuid.UUID = Field(default_factory=uuid.uuid4, primary_key=True)
177178

178179
status: CharacterStatus = Field(default=CharacterStatus.PENDING)
179-
like_count: int = Field(default=0)
180+
180181
total_messages: int = Field(default=0)
181182

183+
182184
creator_id: uuid.UUID = Field(foreign_key="user.id", nullable=False)
183-
184185
creator: User = Relationship(back_populates="created_characters")
185186
conversations: list["Conversation"] = Relationship(back_populates="character")
186187

@@ -190,7 +191,7 @@ class CharacterPublic(CharacterBase):
190191
status: CharacterStatus
191192
creator_id: uuid.UUID
192193

193-
like_count: int
194+
194195
total_messages: int
195196
created_at: datetime
196197

0 commit comments

Comments
 (0)