This commit is contained in:
despiegk 2025-04-19 11:32:36 +02:00
parent acca699f07
commit 6e9305d4e6

View File

@ -27,15 +27,17 @@ pub struct Payment {
pub amount: Currency,
pub date: DateTime<Utc>,
pub method: String,
pub comment: String,
}
impl Payment {
/// Create a new payment
pub fn new(amount: Currency, method: String) -> Self {
pub fn new(amount: Currency, method: String, comment: String) -> Self {
Self {
amount,
date: Utc::now(),
method,
comment,
}
}
}