feat: add task and habit reordering
ci / docker (push) Successful in 3m33s

This commit is contained in:
2026-09-08 06:51:31 +08:00
parent a02b6f660c
commit 988d131d9b
13 changed files with 329 additions and 22 deletions
+10
View File
@@ -96,6 +96,16 @@ class TaskUpdate(BaseModel):
return self
class TaskReorder(BaseModel):
task_ids: list[UUID] = Field(min_length=1)
@model_validator(mode="after")
def unique_ids(self):
if len(self.task_ids) != len(set(self.task_ids)):
raise ValueError("task_ids must be unique")
return self
class TaskOut(BaseModel):
model_config = ConfigDict(from_attributes=True)
id: UUID