diff options
Diffstat (limited to 'makima/src/db/models.rs')
| -rw-r--r-- | makima/src/db/models.rs | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/makima/src/db/models.rs b/makima/src/db/models.rs index 58f4da1..f3977e0 100644 --- a/makima/src/db/models.rs +++ b/makima/src/db/models.rs @@ -531,6 +531,13 @@ pub struct Task { /// Standalone completed tasks can be dismissed by the user. #[serde(default)] pub hidden: bool, + + // Dependency tracking for dependency-ordered execution + /// Task IDs that must complete before this task can start. + /// Used for enforcing execution order: schema changes → backend → UI. + #[serde(default, skip_serializing_if = "Option::is_none")] + #[sqlx(json)] + pub depends_on: Option<Vec<Uuid>>, } impl Task { @@ -611,8 +618,8 @@ pub struct TaskListResponse { } /// Request payload for creating a new task -#[derive(Debug, Deserialize, ToSchema)] -#[serde(rename_all = "camelCase")] +#[derive(Debug, Default, Deserialize, ToSchema)] +#[serde(rename_all = "camelCase", default)] pub struct CreateTaskRequest { /// Contract this task belongs to (optional for branched/anonymous tasks) pub contract_id: Option<Uuid>, @@ -653,6 +660,10 @@ pub struct CreateTaskRequest { pub branched_from_task_id: Option<Uuid>, /// Conversation history to initialize the task with (JSON array of messages) pub conversation_history: Option<serde_json::Value>, + /// Task IDs that must complete before this task can start. + /// Used for enforcing execution order: schema changes → backend → UI. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub depends_on: Option<Vec<Uuid>>, } /// Request payload for updating a task |
