31 lines
694 B
Rust
31 lines
694 B
Rust
use crate::models::locations::LocationType;
|
|
use crate::models::parameters::GeoffreyParam;
|
|
use crate::models::{Portal, Position};
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone)]
|
|
pub struct AddLocationParams {
|
|
pub name: String,
|
|
pub position: Position,
|
|
pub loc_type: LocationType,
|
|
pub portal: Option<Portal>,
|
|
}
|
|
|
|
impl AddLocationParams {
|
|
pub fn new(
|
|
name: String,
|
|
position: Position,
|
|
loc_type: LocationType,
|
|
portal: Option<Portal>,
|
|
) -> Self {
|
|
Self {
|
|
name,
|
|
position,
|
|
loc_type,
|
|
portal,
|
|
}
|
|
}
|
|
}
|
|
|
|
impl GeoffreyParam for AddLocationParams {}
|