Final commit.
This commit is contained in:
20
lib/domain/entity/delivery_credit.dart
Normal file
20
lib/domain/entity/delivery_credit.dart
Normal file
@ -0,0 +1,20 @@
|
||||
/// Aktuelle Betrags-Gutschrift einer Lieferung (Geld-Nachlass, unabhängig von
|
||||
/// Stückzahl). Server-seitig aus dem append-only `delivery_credit_audit`
|
||||
/// abgeleitet (jüngstes Ereignis); existiert nur, solange der letzte Stand
|
||||
/// `set` ist.
|
||||
class DeliveryCredit {
|
||||
const DeliveryCredit({
|
||||
required this.deliveryId,
|
||||
required this.amountCents,
|
||||
required this.reason,
|
||||
});
|
||||
|
||||
final String deliveryId;
|
||||
|
||||
/// Betrag in Cent (> 0, ≤ 15000).
|
||||
final int amountCents;
|
||||
final String reason;
|
||||
|
||||
/// Betrag in ganzen Euro (die Gutschrift läuft in 10-€-Schritten).
|
||||
int get amountEuros => (amountCents / 100).round();
|
||||
}
|
||||
Reference in New Issue
Block a user