Add account type
This commit is contained in:
@ -1,5 +1,7 @@
|
||||
//! # Project constants
|
||||
|
||||
use crate::models::accounts::AccountType;
|
||||
|
||||
/// Length of generated tokens
|
||||
pub const TOKENS_LEN: usize = 50;
|
||||
|
||||
@ -24,3 +26,30 @@ pub const MAX_UPLOAD_FILE_SIZE: usize = 15 * 1024 * 1024;
|
||||
|
||||
/// Minimum elapsed time before a file can be deleted by garbage collector (2 hours)
|
||||
pub const MIN_FILE_LIFETIME: u64 = 3600 * 2;
|
||||
|
||||
/// Description of an account type
|
||||
#[derive(serde::Serialize, Debug)]
|
||||
pub struct AccountTypeDesc {
|
||||
label: &'static str,
|
||||
code: AccountType,
|
||||
icon: &'static str,
|
||||
}
|
||||
|
||||
/// Enumeration of accounts types
|
||||
pub const ACCOUNT_TYPES: [AccountTypeDesc; 3] = [
|
||||
AccountTypeDesc {
|
||||
label: "Cash",
|
||||
code: AccountType::Cash,
|
||||
icon: include_str!("../assets/cash.svg"),
|
||||
},
|
||||
AccountTypeDesc {
|
||||
label: "Bank",
|
||||
code: AccountType::Bank,
|
||||
icon: include_str!("../assets/credit-card.svg"),
|
||||
},
|
||||
AccountTypeDesc {
|
||||
label: "Saving",
|
||||
code: AccountType::Saving,
|
||||
icon: include_str!("../assets/saving.svg"),
|
||||
},
|
||||
];
|
||||
|
Reference in New Issue
Block a user