use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
#[cfg_attr(feature = "specta", derive(specta::Type))]
pub struct CooldownSchema {
#[serde(rename = "total_seconds")]
pub total_seconds: i32,
#[serde(rename = "remaining_seconds")]
pub remaining_seconds: i32,
#[serde(rename = "started_at")]
pub started_at: String,
#[serde(rename = "expiration")]
pub expiration: String,
#[serde(rename = "reason")]
pub reason: models::ActionType,
}
impl CooldownSchema {
pub fn new(
total_seconds: i32,
remaining_seconds: i32,
started_at: String,
expiration: String,
reason: models::ActionType,
) -> CooldownSchema {
CooldownSchema {
total_seconds,
remaining_seconds,
started_at,
expiration,
reason,
}
}
}