payment_page_entity.dart 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. import 'package:domain/generated/json/base/json_field.dart';
  2. import 'package:domain/generated/json/payment_page_entity.g.dart';
  3. import 'dart:convert';
  4. export 'package:domain/generated/json/payment_page_entity.g.dart';
  5. @JsonSerializable()
  6. class PaymentPageEntity {
  7. int count = 0;
  8. int page = 0;
  9. int limit = 0;
  10. @JSONField(name: "count_page")
  11. int countPage = 0;
  12. List<PaymentPageList> list = [];
  13. PaymentPageEntity();
  14. factory PaymentPageEntity.fromJson(Map<String, dynamic> json) => $PaymentPageEntityFromJson(json);
  15. Map<String, dynamic> toJson() => $PaymentPageEntityToJson(this);
  16. @override
  17. String toString() {
  18. return jsonEncode(this);
  19. }
  20. }
  21. @JsonSerializable()
  22. class PaymentPageList {
  23. String? id;
  24. String? type;
  25. @JSONField(name: "start_at")
  26. String? startAt;
  27. @JSONField(name: "end_at")
  28. String? endAt;
  29. String? amount;
  30. @JSONField(name: "paid_by")
  31. dynamic paidBy;
  32. @JSONField(name: "created_at")
  33. String? createdAt;
  34. PaymentPageList();
  35. factory PaymentPageList.fromJson(Map<String, dynamic> json) => $PaymentPageListFromJson(json);
  36. Map<String, dynamic> toJson() => $PaymentPageListToJson(this);
  37. @override
  38. String toString() {
  39. return jsonEncode(this);
  40. }
  41. }