diff options
author | Kaiden Fey <kookie@spacekookie.de> | 2021-02-21 14:56:11 +0100 |
---|---|---|
committer | Kaiden Fey <kookie@spacekookie.de> | 2021-02-21 14:56:11 +0100 |
commit | f186a7345dfc99347673f46e0daff0cb63ac8492 (patch) | |
tree | 5179ffd4654b80ea11a1656e28ef244439648ba4 /apps/koffice/libko/src/client.rs | |
parent | effbdeed66e8de8e769b8ac069926ad1a9110e62 (diff) |
k-office: initial code dumpk-office/init
Diffstat (limited to 'apps/koffice/libko/src/client.rs')
-rw-r--r-- | apps/koffice/libko/src/client.rs | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/apps/koffice/libko/src/client.rs b/apps/koffice/libko/src/client.rs new file mode 100644 index 000000000000..8e256160d3d3 --- /dev/null +++ b/apps/koffice/libko/src/client.rs @@ -0,0 +1,39 @@ +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, +} |