coop.rs (1188B)
1 #![forbid(unsafe_code)] 2 3 use crate::farm::RadrootsGcsLocation; 4 5 #[cfg(not(feature = "std"))] 6 use alloc::{string::String, vec::Vec}; 7 8 #[cfg_attr(feature = "dto-bindgen", derive(dto_bindgen::Dto))] 9 #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] 10 #[derive(Clone, Debug)] 11 pub struct RadrootsCoop { 12 pub d_tag: String, 13 pub name: String, 14 pub about: Option<String>, 15 pub website: Option<String>, 16 pub picture: Option<String>, 17 pub banner: Option<String>, 18 pub location: Option<RadrootsCoopLocation>, 19 pub tags: Option<Vec<String>>, 20 } 21 22 #[cfg_attr(feature = "dto-bindgen", derive(dto_bindgen::Dto))] 23 #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] 24 #[derive(Clone, Debug)] 25 pub struct RadrootsCoopRef { 26 pub pubkey: String, 27 pub d_tag: String, 28 } 29 30 #[cfg_attr(feature = "dto-bindgen", derive(dto_bindgen::Dto))] 31 #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] 32 #[derive(Clone, Debug)] 33 pub struct RadrootsCoopLocation { 34 pub primary: Option<String>, 35 pub city: Option<String>, 36 pub region: Option<String>, 37 pub country: Option<String>, 38 pub gcs: RadrootsGcsLocation, 39 }