use serde::{Serialize, Deserialize}; use chrono::{DateTime, Utc}; #[derive(Serialize, Deserialize)] pub enum ConsentType { Fight, Medicine, Gifts, Visit, Sex } #[derive(Serialize, Deserialize)] pub enum ConsentStatus { PendingAdd, // Added but awaiting other party to ratify by giving matching consent. Active, // Consent in force, no delete pending. PendingDelete, // Pending cancellation but other party has to also disallow to ratify. } #[derive(Serialize, Deserialize)] pub struct FightConsent { status: ConsentStatus, pending_change: Option>, allow_pick: bool, freely_revoke: bool, } #[derive(Serialize, Deserialize)] pub struct Consent { consent_type: ConsentType, fight_consent: Option, expires: Option>, only_in: Vec, allow_private: bool, until_death: bool, }