feat: add more models
This commit is contained in:
parent
92799df15e
commit
26f4070d69
49
src/model.rs
49
src/model.rs
|
@ -8,4 +8,53 @@ pub struct Room {
|
|||
pub room_type: String,
|
||||
pub beds: i32,
|
||||
pub accessibility: bool,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub struct Address {
|
||||
pub street: String,
|
||||
pub house_number: i32,
|
||||
pub postal_code: i32,
|
||||
pub city: String,
|
||||
pub country: String,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub struct Person {
|
||||
pub first_name: String,
|
||||
pub last_name: String,
|
||||
pub age: i32,
|
||||
pub address: Address,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub struct Clerk {
|
||||
pub staff_number: i32,
|
||||
pub salary: i32,
|
||||
pub person_data: Person,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub struct Client {
|
||||
pub id: i32,
|
||||
pub bank_details: String,
|
||||
pub person_data: Person,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub struct Booking {
|
||||
pub id: i32,
|
||||
pub arrival_date: String,
|
||||
pub depature_date: String,
|
||||
pub cost: i32,
|
||||
pub pension_type: String,
|
||||
pub client_id: i32,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub struct CleaningPlan {
|
||||
pub id: i32,
|
||||
pub date: String,
|
||||
pub duration: i32,
|
||||
pub room: Room,
|
||||
}
|
Loading…
Reference in a new issue