progress on batches
This commit is contained in:
72
lib/screens/groups/models/recipient_group_model.dart
Normal file
72
lib/screens/groups/models/recipient_group_model.dart
Normal file
@@ -0,0 +1,72 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:qpay/screens/recipient/recipients_controller.dart';
|
||||
|
||||
part 'recipient_group_model.g.dart';
|
||||
|
||||
@JsonSerializable(explicitToJson: true)
|
||||
class RecipientGroup {
|
||||
final String? id;
|
||||
final String name;
|
||||
final String? description;
|
||||
final String? userId;
|
||||
final String? createdAt;
|
||||
|
||||
const RecipientGroup({
|
||||
this.id,
|
||||
required this.name,
|
||||
this.description,
|
||||
this.userId,
|
||||
this.createdAt,
|
||||
});
|
||||
|
||||
factory RecipientGroup.fromJson(Map<String, dynamic> json) =>
|
||||
_$RecipientGroupFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$RecipientGroupToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable(explicitToJson: true)
|
||||
class RecipientGroupMember {
|
||||
final String? id;
|
||||
final String recipientGroupId;
|
||||
final String? recipientUid;
|
||||
final String? userId;
|
||||
final String? account;
|
||||
final String? createdAt;
|
||||
final Recipient recipient;
|
||||
|
||||
const RecipientGroupMember({
|
||||
this.id,
|
||||
required this.recipientGroupId,
|
||||
this.recipientUid,
|
||||
this.userId,
|
||||
this.account,
|
||||
this.createdAt,
|
||||
required this.recipient,
|
||||
});
|
||||
|
||||
factory RecipientGroupMember.fromJson(Map<String, dynamic> json) =>
|
||||
_$RecipientGroupMemberFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$RecipientGroupMemberToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable(explicitToJson: true)
|
||||
class CreateGroupRequest {
|
||||
final String name;
|
||||
final String? description;
|
||||
final String userId;
|
||||
final List<Recipient> recipients;
|
||||
|
||||
const CreateGroupRequest({
|
||||
required this.name,
|
||||
this.description,
|
||||
required this.userId,
|
||||
required this.recipients,
|
||||
});
|
||||
|
||||
factory CreateGroupRequest.fromJson(Map<String, dynamic> json) =>
|
||||
_$CreateGroupRequestFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$CreateGroupRequestToJson(this);
|
||||
}
|
||||
Reference in New Issue
Block a user