Skip to main content

azisaba_graph/models/
revocation.rs

1/*
2 * Azisaba Graph API
3 *
4 * An API for connecting and sharing data across the Azisaba Network.
5 *
6 * The version of the OpenAPI document: 0.0.1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// Revocation : Represents a punishment revocation.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Revocation {
17    /// The unique identifier of the revocation.
18    #[serde(rename = "id")]
19    pub id: u64,
20    /// The reason the punishment was revoked.
21    #[serde(rename = "reason")]
22    pub reason: String,
23    /// The ID of the actor who revoked the punishment.
24    #[serde(rename = "actorId")]
25    pub actor_id: uuid::Uuid,
26    /// The date and time at which the punishment was revoked.
27    #[serde(rename = "createdAt")]
28    pub created_at: chrono::DateTime<chrono::FixedOffset>,
29}
30
31impl Revocation {
32    /// Represents a punishment revocation.
33    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