azisaba_graph/models/
revocation.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Revocation {
17 #[serde(rename = "id")]
19 pub id: u64,
20 #[serde(rename = "reason")]
22 pub reason: String,
23 #[serde(rename = "actorId")]
25 pub actor_id: uuid::Uuid,
26 #[serde(rename = "createdAt")]
28 pub created_at: chrono::DateTime<chrono::FixedOffset>,
29}
30
31impl Revocation {
32 pub fn new(id: u64, reason: String, actor_id: uuid::Uuid, created_at: chrono::DateTime<chrono::FixedOffset>) -> Revocation {
34 Revocation {
35 id,
36 reason,
37 actor_id,
38 created_at,
39 }
40 }
41}
42