Geoffrey-rs/geoffrey_models/src/models/locations/shop.rs

27 lines
505 B
Rust

use std::collections::HashSet;
use serde::{Deserialize, Serialize};
use crate::models::item::ItemListing;
use crate::GeoffreyDatabaseModel;
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Shop {
id: Option<u64>,
pub item_listings: HashSet<ItemListing>,
}
impl GeoffreyDatabaseModel for Shop {
fn id(&self) -> Option<u64> {
self.id
}
fn set_id(&mut self, id: u64) {
self.id = Some(id);
}
fn tree() -> String {
"shop".to_string()
}
}