...
This commit is contained in:
parent
acca699f07
commit
6e9305d4e6
@ -27,15 +27,17 @@ pub struct Payment {
|
|||||||
pub amount: Currency,
|
pub amount: Currency,
|
||||||
pub date: DateTime<Utc>,
|
pub date: DateTime<Utc>,
|
||||||
pub method: String,
|
pub method: String,
|
||||||
|
pub comment: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Payment {
|
impl Payment {
|
||||||
/// Create a new payment
|
/// Create a new payment
|
||||||
pub fn new(amount: Currency, method: String) -> Self {
|
pub fn new(amount: Currency, method: String, comment: String) -> Self {
|
||||||
Self {
|
Self {
|
||||||
amount,
|
amount,
|
||||||
date: Utc::now(),
|
date: Utc::now(),
|
||||||
method,
|
method,
|
||||||
|
comment,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user