47 lines
1.1 KiB
Rust
47 lines
1.1 KiB
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
|
|
#[serde(rename_all = "camelCase")]
|
|
pub struct CommonTicket {
|
|
pub id: i32,
|
|
pub category: String,
|
|
pub description: String,
|
|
}
|
|
|
|
#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
|
|
#[serde(rename_all = "camelCase")]
|
|
pub struct CommonAdmin {
|
|
pub id: i32,
|
|
pub name: String,
|
|
pub address: String,
|
|
}
|
|
|
|
#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
|
|
#[serde(rename_all = "camelCase")]
|
|
pub struct CommonDriver {
|
|
pub id: i32,
|
|
pub name: String,
|
|
pub address: String,
|
|
}
|
|
|
|
//generate common radar struct
|
|
#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
|
|
#[serde(rename_all = "camelCase")]
|
|
pub struct CommonRadar {
|
|
pub id: i32,
|
|
pub category: Option<String>,
|
|
pub address: Option<String>,
|
|
}
|
|
|
|
#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
|
|
#[serde(rename_all = "camelCase")]
|
|
pub struct CommonVehicle {
|
|
pub model: Option<String>,
|
|
pub category: String,
|
|
pub color: Option<String>,
|
|
pub chasse_num: Option<i32>,
|
|
pub plate_num: String,
|
|
pub vehicle_type: String,
|
|
pub owner: Option<i32>,
|
|
}
|