paid_service_entity.dart 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. import 'package:domain/generated/json/base/json_field.dart';
  2. import 'package:domain/generated/json/paid_service_entity.g.dart';
  3. import 'dart:convert';
  4. export 'package:domain/generated/json/paid_service_entity.g.dart';
  5. @JsonSerializable()
  6. class PaidServiceEntity {
  7. int? count;
  8. int? page;
  9. int? limit;
  10. @JSONField(name: "count_page")
  11. int? countPage;
  12. List<PaidServiceList>? list;
  13. PaidServiceEntity();
  14. factory PaidServiceEntity.fromJson(Map<String, dynamic> json) => $PaidServiceEntityFromJson(json);
  15. Map<String, dynamic> toJson() => $PaidServiceEntityToJson(this);
  16. @override
  17. String toString() {
  18. return jsonEncode(this);
  19. }
  20. }
  21. @JsonSerializable()
  22. class PaidServiceList {
  23. int? id;
  24. String? name;
  25. List<String>? resources;
  26. @JSONField(name: "lowest_price")
  27. int? lowestPrice;
  28. @JSONField(name: "likes_count")
  29. int? likesCount;
  30. bool? liked;
  31. PaidServiceListMerchant? merchant;
  32. PaidServiceListCategory? category;
  33. PaidServiceList();
  34. factory PaidServiceList.fromJson(Map<String, dynamic> json) => $PaidServiceListFromJson(json);
  35. Map<String, dynamic> toJson() => $PaidServiceListToJson(this);
  36. @override
  37. String toString() {
  38. return jsonEncode(this);
  39. }
  40. }
  41. @JsonSerializable()
  42. class PaidServiceListMerchant {
  43. int? id;
  44. String? name;
  45. PaidServiceListMerchant();
  46. factory PaidServiceListMerchant.fromJson(Map<String, dynamic> json) => $PaidServiceListMerchantFromJson(json);
  47. Map<String, dynamic> toJson() => $PaidServiceListMerchantToJson(this);
  48. @override
  49. String toString() {
  50. return jsonEncode(this);
  51. }
  52. }
  53. @JsonSerializable()
  54. class PaidServiceListCategory {
  55. int? id;
  56. String? name;
  57. String? type;
  58. PaidServiceListCategory();
  59. factory PaidServiceListCategory.fromJson(Map<String, dynamic> json) => $PaidServiceListCategoryFromJson(json);
  60. Map<String, dynamic> toJson() => $PaidServiceListCategoryToJson(this);
  61. @override
  62. String toString() {
  63. return jsonEncode(this);
  64. }
  65. }