use serde::{Deserialize, Serialize}; use uuid::Uuid; #[derive(Debug, Deserialize)] pub struct Message { pub territory: u32, pub x: f32, pub y: f32, pub z: f32, pub pack_id: Uuid, pub template_1: usize, pub word_1_list: Option, pub word_1_word: Option, pub conjunction: Option, pub template_2: Option, pub word_2_list: Option, pub word_2_word: Option, } #[derive(Debug, Deserialize)] pub struct VoteMessage { pub post_id: Uuid, pub vote: u8, } #[derive(Debug, Deserialize)] pub struct DeleteMessage { pub post_id: Uuid, } #[derive(Debug, Serialize)] pub struct RetrievedMessage { pub id: String, pub x: f64, pub y: f64, pub z: f64, pub message: String, pub positive_votes: i32, pub negative_votes: i32, } #[derive(Debug, Serialize)] pub struct RetrievedMessageTerritory { pub id: String, puv territory: i64, pub x: f64, pub y: f64, pub z: f64, pub message: String, pub positive_votes: i32, pub negative_votes: i32, }