paid_service_detail_entity.dart 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. import 'package:domain/generated/json/base/json_field.dart';
  2. import 'package:domain/generated/json/paid_service_detail_entity.g.dart';
  3. import 'dart:convert';
  4. export 'package:domain/generated/json/paid_service_detail_entity.g.dart';
  5. @JsonSerializable()
  6. class PaidServiceDetailEntity {
  7. int? id;
  8. List<String>? resources;
  9. String? name;
  10. @JSONField(name: "evaluations_avg_score")
  11. int? evaluationsAvgScore;
  12. String? highlight;
  13. @JSONField(name: "urgent_price")
  14. int? urgentPrice;
  15. @JSONField(name: "holiday_price")
  16. int? holidayPrice;
  17. @JSONField(name: "night_price")
  18. double? nightPrice;
  19. @JSONField(name: "service_period_start")
  20. String? servicePeriodStart;
  21. @JSONField(name: "service_period_end")
  22. String? servicePeriodEnd;
  23. @JSONField(name: "service_period_interval")
  24. int? servicePeriodInterval;
  25. String? description;
  26. PaidServiceDetailMerchant? merchant;
  27. PaidServiceDetailCategory? category;
  28. List<PaidServiceDetailProducts>? products;
  29. List<PaidServiceDetailEvaluations>? evaluations;
  30. PaidServiceDetailEntity();
  31. factory PaidServiceDetailEntity.fromJson(Map<String, dynamic> json) => $PaidServiceDetailEntityFromJson(json);
  32. Map<String, dynamic> toJson() => $PaidServiceDetailEntityToJson(this);
  33. @override
  34. String toString() {
  35. return jsonEncode(this);
  36. }
  37. }
  38. @JsonSerializable()
  39. class PaidServiceDetailMerchant {
  40. int? id;
  41. String? name;
  42. PaidServiceDetailMerchant();
  43. factory PaidServiceDetailMerchant.fromJson(Map<String, dynamic> json) => $PaidServiceDetailMerchantFromJson(json);
  44. Map<String, dynamic> toJson() => $PaidServiceDetailMerchantToJson(this);
  45. @override
  46. String toString() {
  47. return jsonEncode(this);
  48. }
  49. }
  50. @JsonSerializable()
  51. class PaidServiceDetailCategory {
  52. int? id;
  53. String? name;
  54. String? type;
  55. PaidServiceDetailCategory();
  56. factory PaidServiceDetailCategory.fromJson(Map<String, dynamic> json) => $PaidServiceDetailCategoryFromJson(json);
  57. Map<String, dynamic> toJson() => $PaidServiceDetailCategoryToJson(this);
  58. @override
  59. String toString() {
  60. return jsonEncode(this);
  61. }
  62. }
  63. @JsonSerializable()
  64. class PaidServiceDetailProducts {
  65. int? id;
  66. String? name;
  67. @JSONField(name: "short_description")
  68. String? shortDescription;
  69. int? price;
  70. PaidServiceDetailProducts();
  71. factory PaidServiceDetailProducts.fromJson(Map<String, dynamic> json) => $PaidServiceDetailProductsFromJson(json);
  72. Map<String, dynamic> toJson() => $PaidServiceDetailProductsToJson(this);
  73. @override
  74. String toString() {
  75. return jsonEncode(this);
  76. }
  77. }
  78. @JsonSerializable()
  79. class PaidServiceDetailEvaluations {
  80. int? id;
  81. int? score;
  82. String? comment;
  83. List<String>? resources;
  84. PaidServiceDetailEvaluationsAccount? account;
  85. @JSONField(name: "created_at")
  86. String? createdAt;
  87. PaidServiceDetailEvaluations();
  88. factory PaidServiceDetailEvaluations.fromJson(Map<String, dynamic> json) => $PaidServiceDetailEvaluationsFromJson(json);
  89. Map<String, dynamic> toJson() => $PaidServiceDetailEvaluationsToJson(this);
  90. @override
  91. String toString() {
  92. return jsonEncode(this);
  93. }
  94. }
  95. @JsonSerializable()
  96. class PaidServiceDetailEvaluationsAccount {
  97. int? id;
  98. String? name;
  99. String? avatar;
  100. PaidServiceDetailEvaluationsAccount();
  101. factory PaidServiceDetailEvaluationsAccount.fromJson(Map<String, dynamic> json) => $PaidServiceDetailEvaluationsAccountFromJson(json);
  102. Map<String, dynamic> toJson() => $PaidServiceDetailEvaluationsAccountToJson(this);
  103. @override
  104. String toString() {
  105. return jsonEncode(this);
  106. }
  107. }