import 'package:json_annotation/json_annotation.dart'; part 'group_batch_model.g.dart'; @JsonSerializable(explicitToJson: true) class GroupBatch { final String? id; final String? recipientGroupId; final String? userId; final String? currency; final String? description; final double? value; final String? status; final String? paymentProcessorLabel; final String? paymentProcessorName; final String? paymentProcessorImage; final String? transactionTemplate; final String? createdAt; final int? count; final int? successfulCount; final int? failedCount; const GroupBatch({ this.id, this.recipientGroupId, this.userId, this.currency, this.description, this.value, this.status, this.paymentProcessorLabel, this.paymentProcessorName, this.paymentProcessorImage, this.transactionTemplate, this.createdAt, this.count, this.successfulCount, this.failedCount, }); factory GroupBatch.fromJson(Map json) => _$GroupBatchFromJson(json); Map toJson() => _$GroupBatchToJson(this); } @JsonSerializable(explicitToJson: true) class GroupBatchItem { final String? id; final String? groupBatchId; final String? recipientName; final String? recipientPhone; final double? amount; final String? status; final String? transactionId; final String? errorMessage; final String? createdAt; const GroupBatchItem({ this.id, this.groupBatchId, this.recipientName, this.recipientPhone, this.amount, this.status, this.transactionId, this.errorMessage, this.createdAt, }); factory GroupBatchItem.fromJson(Map json) => _$GroupBatchItemFromJson(json); Map toJson() => _$GroupBatchItemToJson(this); } @JsonSerializable(explicitToJson: true) class CreateBatchRequest { final String recipientGroupId; final String userId; final String currency; final String description; final double amount; final String? paymentProcessorLabel; final String? paymentProcessorName; final String? paymentProcessorImage; final Map transactionTemplate; const CreateBatchRequest({ required this.recipientGroupId, required this.userId, required this.currency, required this.description, required this.amount, this.paymentProcessorLabel, this.paymentProcessorName, this.paymentProcessorImage, required this.transactionTemplate, }); factory CreateBatchRequest.fromJson(Map json) => _$CreateBatchRequestFromJson(json); Map toJson() => _$CreateBatchRequestToJson(this); } @JsonSerializable() class BatchActionRequest { final String userId; final String idempotencyKey; const BatchActionRequest({ required this.userId, required this.idempotencyKey, }); factory BatchActionRequest.fromJson(Map json) => _$BatchActionRequestFromJson(json); Map toJson() => _$BatchActionRequestToJson(this); } @JsonSerializable(explicitToJson: true) class GroupBatchUpdateRequest { String? id; String? userId; String? paymentProcessorLabel; String? paymentProcessorName; String? paymentProcessorImage; GroupBatchUpdateRequest({ this.id, this.userId, this.paymentProcessorLabel, this.paymentProcessorName, this.paymentProcessorImage, }); factory GroupBatchUpdateRequest.fromJson(Map json) => _$GroupBatchUpdateRequestFromJson(json); Map toJson() => _$GroupBatchUpdateRequestToJson(this); }