artifacts/models/
event_map_schema.rs

1use crate::models;
2use serde::{Deserialize, Serialize};
3
4#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
5#[cfg_attr(feature = "specta", derive(specta::Type))]
6pub struct EventMapSchema {
7    /// Position X of the map.
8    #[serde(rename = "x")]
9    pub x: i32,
10    /// Position Y of the map.
11    #[serde(rename = "y")]
12    pub y: i32,
13    /// Map skin of the map
14    #[serde(rename = "skin")]
15    pub skin: String,
16}
17
18impl EventMapSchema {
19    pub fn new(x: i32, y: i32, skin: String) -> EventMapSchema {
20        EventMapSchema { x, y, skin }
21    }
22}