fix: 完善商品—模特库-视频项目-自由创作等删除先进垃圾桶及可恢复等流程
This commit is contained in:
@@ -73,12 +73,14 @@ class ImageConversation(TeamOwnedModel):
|
||||
related_name="image_conversations",
|
||||
)
|
||||
is_deleted = models.BooleanField(default=False)
|
||||
purged_at = models.DateTimeField(null=True, blank=True)
|
||||
# 每次在该对话里发起生成都刷新,左栏「最近」按它倒序
|
||||
last_active_at = models.DateTimeField(auto_now_add=True)
|
||||
|
||||
class Meta:
|
||||
indexes = [
|
||||
models.Index(fields=["team", "mode", "-last_active_at"]),
|
||||
models.Index(fields=["team", "is_deleted", "purged_at"]),
|
||||
]
|
||||
|
||||
def __str__(self) -> str:
|
||||
@@ -149,6 +151,7 @@ class AITask(TeamOwnedModel):
|
||||
# 自由创作任务流的收藏 / 软删(其它任务类型恒 False,无行为影响)
|
||||
is_favorited = models.BooleanField(default=False)
|
||||
is_deleted = models.BooleanField(default=False)
|
||||
purged_at = models.DateTimeField(null=True, blank=True)
|
||||
|
||||
class Meta:
|
||||
indexes = [
|
||||
@@ -163,6 +166,7 @@ class AITask(TeamOwnedModel):
|
||||
models.Index(fields=["team", "read_at"]),
|
||||
# 自由创作任务流:按团队 + 类型倒序分页
|
||||
models.Index(fields=["team", "task_type", "-created_at"]),
|
||||
models.Index(fields=["team", "is_deleted", "purged_at"]),
|
||||
]
|
||||
|
||||
def __str__(self) -> str:
|
||||
|
||||
Reference in New Issue
Block a user