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    /// ID of the map.
8    #[serde(rename = "map_id")]
9    pub map_id: i32,
10    /// Position X of the map.
11    #[serde(rename = "x")]
12    pub x: i32,
13    /// Position Y of the map.
14    #[serde(rename = "y")]
15    pub y: i32,
16    /// Layer of the map.
17    #[serde(rename = "layer")]
18    pub layer: String,
19    /// Map skin of the map
20    #[serde(rename = "skin")]
21    pub skin: String,
22}
23
24impl EventMapSchema {
25    pub fn new(map_id: i32, x: i32, y: i32, layer: String, skin: String) -> EventMapSchema {
26        EventMapSchema {
27            map_id,
28            x,
29            y,
30            layer,
31            skin,
32        }
33    }
34}