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.
34 lines
650 B
34 lines
650 B
3 years ago
|
use crate::{Account, Address, Worker, InvoiceId};
|
||
|
use chrono::NaiveDate;
|
||
|
use serde::{Serialize, Deserialize};
|
||
|
|
||
|
/// Describes invoice metadata
|
||
|
#[derive(Serialize, Deserialize)]
|
||
|
pub struct InvoiceFile {
|
||
|
invoice_id: InvoiceId,
|
||
|
date: NaiveDate,
|
||
|
author: Worker,
|
||
|
account: Account,
|
||
|
client: Address,
|
||
|
vat: u8,
|
||
|
service: Vec<ServiceEntry>,
|
||
|
currency: String,
|
||
|
lang: String,
|
||
|
}
|
||
|
|
||
|
/// A service description
|
||
|
#[derive(Serialize, Deserialize)]
|
||
|
pub enum ServiceEntry {
|
||
|
Line(String),
|
||
|
Hash {
|
||
|
description: String,
|
||
|
price: usize,
|
||
|
details: Vec<String>,
|
||
|
}
|
||
|
}
|
||
|
|
||
|
pub fn data_templ() -> String {
|
||
|
|
||
|
todo!()
|
||
|
}
|