use chrono::NaiveDate; use serde::{Deserialize, Serialize}; #[derive(Debug, Serialize, Deserialize)] pub struct Worker { pub name: String, pub address: Address, pub account: Account, } /// An entry in the client database #[derive(Debug, Serialize, Deserialize)] pub struct Client { pub name: String, pub address: Address, pub last_project: Option, } /// An address with all associated data #[derive(Debug, Serialize, Deserialize)] pub struct Address { pub name: String, pub street: String, pub no: String, pub zip: String, pub city: String, pub country: String, } /// A bank account with a account, and bank number /// /// This is kept as generically as possible, to allow as many /// different account representations to work. #[derive(Debug, Serialize, Deserialize)] pub struct Account { pub bank_name: String, pub acc_num: String, pub bank_num: String, }