2021-10-23 19:13:28 +00:00
|
|
|
use crate::models::locations::LocationType;
|
2021-12-18 03:03:15 +00:00
|
|
|
use crate::models::parameters::GeoffreyParam;
|
2021-12-08 03:33:25 +00:00
|
|
|
use crate::models::{Portal, Position};
|
2021-10-03 20:03:32 +00:00
|
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone)]
|
|
|
|
pub struct AddLocationParams {
|
|
|
|
pub name: String,
|
|
|
|
pub position: Position,
|
|
|
|
pub loc_type: LocationType,
|
2021-12-05 23:51:13 +00:00
|
|
|
pub portal: Option<Portal>,
|
2021-10-03 20:03:32 +00:00
|
|
|
}
|
2021-10-24 19:20:15 +00:00
|
|
|
|
2021-12-01 04:13:56 +00:00
|
|
|
impl AddLocationParams {
|
|
|
|
pub fn new(
|
|
|
|
name: String,
|
|
|
|
position: Position,
|
|
|
|
loc_type: LocationType,
|
2021-12-05 23:51:13 +00:00
|
|
|
portal: Option<Portal>,
|
2021-12-01 04:13:56 +00:00
|
|
|
) -> Self {
|
|
|
|
Self {
|
|
|
|
name,
|
|
|
|
position,
|
|
|
|
loc_type,
|
2021-12-05 23:51:13 +00:00
|
|
|
portal,
|
2021-12-01 04:13:56 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-12-18 03:03:15 +00:00
|
|
|
impl GeoffreyParam for AddLocationParams {}
|