use yog_data::Schema;
#[derive(Debug, Clone, Copy, PartialEq, Eq, Schema)]
pub enum Kind {
String,
Image,
File,
Sound,
Color,
Number,
Bool,
}
impl Kind {
pub fn name(self) -> &'static str {
match self {
Kind::String => "string",
Kind::Image => "image",
Kind::File => "file",
Kind::Sound => "sound",
Kind::Color => "color",
Kind::Number => "number",
Kind::Bool => "bool",
}
}
}
#[derive(Schema)]
pub struct EntryObject {
#[data(rename = "type")]
pub kind: Option<Kind>,
pub value: yog_data::Value,
pub comment: Option<String>,
pub key: Option<String>,
pub texture: Option<String>,
pub event: Option<String>,
pub subtitle: Option<String>,
}