You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
933 B
39 lines
933 B
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<NaiveDate>,
|
|
}
|
|
|
|
/// 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,
|
|
}
|
|
|