aboutsummaryrefslogtreecommitdiff
path: root/apps/koffice/libko/src/client.rs
blob: 8e256160d3d3dd85b3975851e2c45cd32bc5f0a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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,
}