...
This commit is contained in:
		@@ -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,
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user