#![allow(non_camel_case_types, non_snake_case, dead_code, unused_imports)]
use chrono::{Duration, Utc};
use uuid::Uuid;
#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct t3 {
pub s37: String,
pub s10: String,
pub s13: String,
pub s14: String,
}
impl t3 {
pub fn f18(username: &str) -> Self {
let now = Utc::now();
let expires = now + Duration::hours(24);
Self {
s37: Uuid::new_v4().to_string(),
s10: username.to_string(),
s13: now.to_rfc3339(),
s14: expires.to_rfc3339(),
}
}
pub fn f19(&self) -> bool {
chrono::DateTime::parse_from_rfc3339(&self.s14)
.map(|dt| dt.with_timezone(&Utc) > Utc::now())
.unwrap_or(false)
}
}