summaryrefslogtreecommitdiff
path: root/makima/ios/Sources/Makima/Models/Contract.swift
blob: 8c9de58980699898f519302572fe32e63359e69a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import Foundation

/// Matches `src/db/models.rs::Contract` (camelCase).
struct Contract: Decodable, Identifiable, Hashable {
    let id: String
    let ownerId: String?
    let name: String
    let description: String?
    let contractType: String     // "simple" | "specification"
    let phase: String            // "research" | "specify" | "plan" | "execute" | "review"
    let status: String           // "active" | "completed" | "archived"
    let supervisorTaskId: String?
    let autonomousLoop: Bool?
    let phaseGuard: Bool?
    let localOnly: Bool?
    let version: Int?
    let createdAt: Date?
    let updatedAt: Date?

    var isActive: Bool { status.lowercased() == "active" }
}