artifacts/models/
event_content_schema.rs1use 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 EventContentSchema {
7 #[serde(rename = "type")]
9 pub r#type: models::MapContentType,
10 #[serde(rename = "code")]
12 pub code: String,
13}
14
15impl EventContentSchema {
16 pub fn new(r#type: models::MapContentType, code: String) -> EventContentSchema {
17 EventContentSchema { r#type, code }
18 }
19}