use rinja::Template;
use serde::Deserialize;

use crate::models::{Role, User, Vehicle};

pub mod delete;
pub mod get_edit;
pub mod get_new;
pub mod get_overview;
pub mod post_edit;
pub mod post_new;

#[derive(Template)]
#[template(path = "vehicles/new_or_edit.html")]
pub struct VehicleNewOrEditTemplate {
    user: User,
    vehicle: Option<Vehicle>,
}

#[derive(Deserialize)]
pub struct VehicleForm {
    radio_call_name: String,
    station: String,
}
