fistinc-auth 0.1.0

Paging types for Fist Inc bank
Documentation
use chrono::{DateTime, Utc};
use uuid::Uuid;
use serde::{Serialize, Deserialize};

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct LoginAction {
    pub user_id: Uuid,
    pub date_time: DateTime<Utc>,
    pub ip: String, // todo use special type
}

impl LoginAction {
    pub fn new(user_id: Uuid, ip: &str) -> Self {
        Self {
            user_id,
            date_time: Utc::now(),
            ip: ip.to_string()
        }
    }
}