toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
      'id': id,
      'number': number,
      'shiftId': shiftId,
      'type': type,
      'amountCents': amountCents,
      'location': location,
      'note': note,
      'by': by?.toJson(),
      'at': at,
      'recipient': recipient == null ? null : {'registerUserId': recipient!.registerUserId, 'name': recipient!.name},
      'counterpart':
          counterpart == null ? null : {'drawerId': counterpart!.drawerId, 'movementId': counterpart!.movementId},
    };