1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use serde::{Serialize, Deserialize};
use super::Commit;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Deploy {
pub commit: Commit,
#[serde(rename = "createdAt")]
pub created_at: chrono::DateTime<chrono::Utc>,
#[serde(rename = "finishedAt")]
pub finished_at: chrono::DateTime<chrono::Utc>,
pub id: String,
pub status: String,
#[serde(rename = "updatedAt")]
pub updated_at: chrono::DateTime<chrono::Utc>,
}
impl std::fmt::Display for Deploy {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
write!(f, "{}", serde_json::to_string(self).unwrap())
}
}