facility_page_entity.dart 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. import 'package:domain/generated/json/base/json_field.dart';
  2. import 'package:domain/generated/json/facility_page_entity.g.dart';
  3. import 'dart:convert';
  4. export 'package:domain/generated/json/facility_page_entity.g.dart';
  5. @JsonSerializable()
  6. class FacilityPageEntity {
  7. int count = 0;
  8. int page = 0;
  9. int limit = 0;
  10. @JSONField(name: "count_page")
  11. int countPage = 0;
  12. @JSONField(name: "total_deposit")
  13. String? totalDeposit;
  14. List<FacilityDetail>? list = [];
  15. FacilityPageEntity();
  16. factory FacilityPageEntity.fromJson(Map<String, dynamic> json) => $FacilityPageEntityFromJson(json);
  17. Map<String, dynamic> toJson() => $FacilityPageEntityToJson(this);
  18. @override
  19. String toString() {
  20. return jsonEncode(this);
  21. }
  22. }
  23. @JsonSerializable()
  24. class FacilityDetail {
  25. FacilityPageListBooking? booking;
  26. FacilityPageListFacility? facility;
  27. @JSONField(name: "time_period")
  28. FacilityPageListTimePeriod? timePeriod;
  29. FacilityPageListAccount? account;
  30. FacilityDetail();
  31. factory FacilityDetail.fromJson(Map<String, dynamic> json) => $FacilityDetailFromJson(json);
  32. Map<String, dynamic> toJson() => $FacilityDetailToJson(this);
  33. @override
  34. String toString() {
  35. return jsonEncode(this);
  36. }
  37. }
  38. @JsonSerializable()
  39. class FacilityPageListBooking {
  40. String? id;
  41. String? date;
  42. String? start;
  43. String? end;
  44. @JSONField(name: "deposit_paid")
  45. String? depositPaid;
  46. @JSONField(name: "deposit_refund")
  47. String? depositRefund;
  48. @JSONField(name: "deposit_refund_at")
  49. String? depositRefundAt;
  50. FacilityPageListBooking();
  51. factory FacilityPageListBooking.fromJson(Map<String, dynamic> json) => $FacilityPageListBookingFromJson(json);
  52. Map<String, dynamic> toJson() => $FacilityPageListBookingToJson(this);
  53. @override
  54. String toString() {
  55. return jsonEncode(this);
  56. }
  57. }
  58. @JsonSerializable()
  59. class FacilityPageListFacility {
  60. String? id;
  61. String? name;
  62. FacilityPageListFacilityType? type;
  63. FacilityPageListFacility();
  64. factory FacilityPageListFacility.fromJson(Map<String, dynamic> json) => $FacilityPageListFacilityFromJson(json);
  65. Map<String, dynamic> toJson() => $FacilityPageListFacilityToJson(this);
  66. @override
  67. String toString() {
  68. return jsonEncode(this);
  69. }
  70. }
  71. @JsonSerializable()
  72. class FacilityPageListFacilityType {
  73. String? id;
  74. String? name;
  75. FacilityPageListFacilityType();
  76. factory FacilityPageListFacilityType.fromJson(Map<String, dynamic> json) => $FacilityPageListFacilityTypeFromJson(json);
  77. Map<String, dynamic> toJson() => $FacilityPageListFacilityTypeToJson(this);
  78. @override
  79. String toString() {
  80. return jsonEncode(this);
  81. }
  82. }
  83. @JsonSerializable()
  84. class FacilityPageListTimePeriod {
  85. String? price;
  86. String? deposit;
  87. FacilityPageListTimePeriod();
  88. factory FacilityPageListTimePeriod.fromJson(Map<String, dynamic> json) => $FacilityPageListTimePeriodFromJson(json);
  89. Map<String, dynamic> toJson() => $FacilityPageListTimePeriodToJson(this);
  90. @override
  91. String toString() {
  92. return jsonEncode(this);
  93. }
  94. }
  95. @JsonSerializable()
  96. class FacilityPageListAccount {
  97. String? id;
  98. String? name;
  99. FacilityPageListAccount();
  100. factory FacilityPageListAccount.fromJson(Map<String, dynamic> json) => $FacilityPageListAccountFromJson(json);
  101. Map<String, dynamic> toJson() => $FacilityPageListAccountToJson(this);
  102. @override
  103. String toString() {
  104. return jsonEncode(this);
  105. }
  106. }