diff options
| author | soryu <soryu@soryu.co> | 2026-03-05 23:16:25 +0000 |
|---|---|---|
| committer | soryu <soryu@soryu.co> | 2026-03-07 02:27:41 +0000 |
| commit | 745b6f1b794e3d18f0ed42b1d261fc2bbcddb27e (patch) | |
| tree | 30f20b861e33adcab7258c8212e901c7d8accb45 /makima/src/db/models.rs | |
| parent | 0c844a312933e035de2dff8bda769db485d79fe5 (diff) | |
| download | soryu-745b6f1b794e3d18f0ed42b1d261fc2bbcddb27e.tar.gz soryu-745b6f1b794e3d18f0ed42b1d261fc2bbcddb27e.zip | |
WIP: heartbeat checkpoint
Diffstat (limited to 'makima/src/db/models.rs')
| -rw-r--r-- | makima/src/db/models.rs | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/makima/src/db/models.rs b/makima/src/db/models.rs index 32e55f0..97657dc 100644 --- a/makima/src/db/models.rs +++ b/makima/src/db/models.rs @@ -2925,6 +2925,8 @@ pub struct Order { pub directive_name: Option<String>, /// Repository context pub repository_url: Option<String>, + /// Optional DOG (Directive Order Group) this order belongs to + pub dog_id: Option<Uuid>, pub created_at: DateTime<Utc>, pub updated_at: DateTime<Utc>, } @@ -2943,6 +2945,8 @@ pub struct CreateOrderRequest { /// Directive ID is required for new orders. pub directive_id: Uuid, pub repository_url: Option<String>, + /// Optional DOG (Directive Order Group) to assign this order to. + pub dog_id: Option<Uuid>, } /// Default empty JSON array for labels. @@ -2963,6 +2967,8 @@ pub struct UpdateOrderRequest { pub directive_id: Option<Uuid>, pub directive_step_id: Option<Uuid>, pub repository_url: Option<String>, + /// Optional DOG (Directive Order Group) to assign/reassign this order to. + pub dog_id: Option<Uuid>, } /// Response for order list endpoint. @@ -2986,6 +2992,8 @@ pub struct OrderListQuery { pub priority: Option<String>, /// Filter by linked directive ID pub directive_id: Option<Uuid>, + /// Filter by DOG (Directive Order Group) ID + pub dog_id: Option<Uuid>, /// Text search across title, description, and directive_name (case-insensitive) pub search: Option<String>, } @@ -2997,4 +3005,49 @@ pub struct LinkDirectiveRequest { pub directive_id: Uuid, } +// ============================================================================= +// Directive Order Group (DOG) Types +// ============================================================================= + +/// A Directive Order Group (DOG) — an epic-like grouping of orders within a directive. +/// DOGs allow organizing related orders under a common theme or goal. +#[derive(Debug, Clone, FromRow, Serialize, Deserialize, ToSchema)] +#[serde(rename_all = "camelCase")] +pub struct DirectiveOrderGroup { + pub id: Uuid, + pub directive_id: Uuid, + pub owner_id: Uuid, + pub name: String, + pub description: Option<String>, + /// Status: open, in_progress, done, archived + pub status: String, + pub created_at: DateTime<Utc>, + pub updated_at: DateTime<Utc>, +} + +/// Request to create a new Directive Order Group (DOG). +#[derive(Debug, Deserialize, ToSchema)] +#[serde(rename_all = "camelCase")] +pub struct CreateDirectiveOrderGroupRequest { + pub name: String, + pub description: Option<String>, +} + +/// Request to update a Directive Order Group (DOG). +#[derive(Debug, Default, Deserialize, ToSchema)] +#[serde(rename_all = "camelCase")] +pub struct UpdateDirectiveOrderGroupRequest { + pub name: Option<String>, + pub description: Option<String>, + pub status: Option<String>, +} + +/// Response for DOG list endpoint. +#[derive(Debug, Serialize, ToSchema)] +#[serde(rename_all = "camelCase")] +pub struct DirectiveOrderGroupListResponse { + pub dogs: Vec<DirectiveOrderGroup>, + pub total: i64, +} + |
