feat: organize lists with drag and drop
This commit is contained in:
@@ -74,8 +74,30 @@ class ListOut(BaseModel):
|
||||
folder_id: UUID | None
|
||||
name: str
|
||||
is_inbox: bool
|
||||
position: int
|
||||
|
||||
|
||||
class ListMove(BaseModel):
|
||||
folder_id: UUID | None
|
||||
list_ids: list[UUID] = Field(min_length=1)
|
||||
|
||||
@model_validator(mode="after")
|
||||
def unique_ids(self):
|
||||
if len(self.list_ids) != len(set(self.list_ids)):
|
||||
raise ValueError("list_ids must be unique")
|
||||
return self
|
||||
|
||||
|
||||
class ListReorder(BaseModel):
|
||||
folder_id: UUID | None
|
||||
list_ids: list[UUID] = Field(min_length=1)
|
||||
|
||||
@model_validator(mode="after")
|
||||
def unique_ids(self):
|
||||
if len(self.list_ids) != len(set(self.list_ids)):
|
||||
raise ValueError("list_ids must be unique")
|
||||
return self
|
||||
|
||||
|
||||
class TaskCreate(BaseModel):
|
||||
title: str = Field(min_length=1, max_length=500)
|
||||
|
||||
Reference in New Issue
Block a user