garage_sale_rent_entity.dart 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. import 'package:domain/generated/json/base/json_field.dart';
  2. import 'package:domain/generated/json/garage_sale_rent_entity.g.dart';
  3. import 'dart:convert';
  4. export 'package:domain/generated/json/garage_sale_rent_entity.g.dart';
  5. @JsonSerializable()
  6. class GarageSaleRentEntity {
  7. int? count;
  8. int? page;
  9. int? limit;
  10. @JSONField(name: "count_page")
  11. int? countPage;
  12. List<GarageSaleRentList>? list;
  13. GarageSaleRentEntity();
  14. factory GarageSaleRentEntity.fromJson(Map<String, dynamic> json) => $GarageSaleRentEntityFromJson(json);
  15. Map<String, dynamic> toJson() => $GarageSaleRentEntityToJson(this);
  16. @override
  17. String toString() {
  18. return jsonEncode(this);
  19. }
  20. }
  21. @JsonSerializable()
  22. class GarageSaleRentList {
  23. int? id;
  24. String? title;
  25. int? price;
  26. List<String>? resources;
  27. @JSONField(name: "created_at")
  28. String? createdAt;
  29. bool? liked;
  30. @JSONField(name: "likes_count")
  31. int? likesCount;
  32. GarageSaleRentListAccount? account;
  33. GarageSaleRentList();
  34. factory GarageSaleRentList.fromJson(Map<String, dynamic> json) => $GarageSaleRentListFromJson(json);
  35. Map<String, dynamic> toJson() => $GarageSaleRentListToJson(this);
  36. @override
  37. String toString() {
  38. return jsonEncode(this);
  39. }
  40. }
  41. @JsonSerializable()
  42. class GarageSaleRentListAccount {
  43. int? id;
  44. String? name;
  45. String? avatar;
  46. GarageSaleRentListAccount();
  47. factory GarageSaleRentListAccount.fromJson(Map<String, dynamic> json) => $GarageSaleRentListAccountFromJson(json);
  48. Map<String, dynamic> toJson() => $GarageSaleRentListAccountToJson(this);
  49. @override
  50. String toString() {
  51. return jsonEncode(this);
  52. }
  53. }