levi_core/entities/status_change.rs
1use myko::prelude::*;
2
3#[myko_subtype(derive(Eq, Copy))]
4pub enum StatusKind {
5 Closed,
6 Reopened,
7}
8
9/// Append-only status-change record; never edited. Effective status of a task
10/// on a checkout is a fold over these, restricted to changes whose
11/// `anchor_commit` is an ancestor of HEAD (see `resolve::effective_status`).
12#[myko_item]
13pub struct StatusChange {
14 pub project_id: String,
15 pub task_id: String,
16 pub to_status: StatusKind,
17 /// Full commit sha (hex). None = unanchored: applies on every checkout.
18 #[serde(default)]
19 pub anchor_commit: Option<String>,
20 /// RFC3339
21 pub created: String,
22 pub by_dev: String,
23 pub by_machine: String,
24}