1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
* enbbox API
*
* Notification infrastructure API — open-source alternative to Novu/Courier
*
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// WorkflowRunRecord : A single execution run of a workflow — tracks start/end time and completion status.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct WorkflowRunRecord {
/// ISO 8601 timestamp when the run completed (null if still running).
#[serde(rename = "completed_at", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub completed_at: Option<Option<String>>,
/// Run UUID.
#[serde(rename = "id")]
pub id: String,
/// Project where the run executed.
#[serde(rename = "project_id")]
pub project_id: String,
/// ISO 8601 timestamp when the run started.
#[serde(rename = "started_at")]
pub started_at: String,
/// Run status: `running`, `completed`, `failed`.
#[serde(rename = "status")]
pub status: String,
/// Workflow UUID that was executed.
#[serde(rename = "workflow_id")]
pub workflow_id: String,
}
impl WorkflowRunRecord {
/// A single execution run of a workflow — tracks start/end time and completion status.
pub fn new(id: String, project_id: String, started_at: String, status: String, workflow_id: String) -> WorkflowRunRecord {
WorkflowRunRecord {
completed_at: None,
id,
project_id,
started_at,
status,
workflow_id,
}
}
}