artifacts/models/
give_items_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 GiveItemsSchema {
7    /// List of items to give
8    #[serde(rename = "items")]
9    pub items: Vec<models::SimpleItemSchema>,
10    /// Character name. The name of the character who will receive the items.
11    #[serde(rename = "character")]
12    pub character: String,
13}
14
15impl GiveItemsSchema {
16    pub fn new(items: Vec<models::SimpleItemSchema>, character: String) -> GiveItemsSchema {
17        GiveItemsSchema { items, character }
18    }
19}