toJson method
Die Drahtform; Felder, die fehlen (kein Recht), fehlen auch hier.
Implementation
Map<String, dynamic> toJson() => {
'id': id,
'drawerId': drawerId,
'cashregisterId': cashregisterId,
'number': number,
'status': status,
'openedAt': openedAt,
'openedBy': openedBy?.toJson(),
'openedDeviceId': openedDeviceId,
'closedAt': closedAt,
'closedBy': closedBy?.toJson(),
'closedDeviceId': closedDeviceId,
'openingFloatCents': openingFloatCents,
'openingDenominations': openingDenominations == null ? null : {...openingDenominations!},
if (openingFloatTakenOver != null) 'openingFloatTakenOver': openingFloatTakenOver,
'comment': comment,
'blind': blind,
if (countedCents != null) 'countedCents': countedCents,
if (suggestedFloatCents != null) 'suggestedFloatCents': suggestedFloatCents,
if (runningTotals != null) 'runningTotals': runningTotals!.toJson(),
if (expectedCents != null) 'expectedCents': expectedCents,
if (differenceCents != null) 'differenceCents': differenceCents,
if (reconciliation != null) 'reconciliation': reconciliation!.toJson(),
if (afterCount != null) 'afterCount': afterCount!.toJson(),
if (leftInDrawerCents != null) 'leftInDrawerCents': leftInDrawerCents,
if (openingCounted != null) 'openingCounted': openingCounted,
if (expectedParts != null) 'expectedParts': [for (final t in expectedParts!) t.toJson()],
if (cashTipsInDrawerCents != null) 'cashTipsInDrawerCents': cashTipsInDrawerCents,
if (interimCounts != null) 'interimCounts': interimCounts,
if (interimDifferenceCents != null) 'interimDifferenceCents': interimDifferenceCents,
if (differenceParts != null) 'differenceParts': [for (final t in differenceParts!) t.toJson()],
if (countedBeforePayoutCents != null) 'countedBeforePayoutCents': countedBeforePayoutCents,
};