myposts_sale_rent_entity.dart 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import 'package:domain/generated/json/base/json_field.dart';
  2. import 'package:domain/generated/json/myposts_sale_rent_entity.g.dart';
  3. import 'dart:convert';
  4. export 'package:domain/generated/json/myposts_sale_rent_entity.g.dart';
  5. @JsonSerializable()
  6. class MypostsSaleRentEntity {
  7. int? count;
  8. int? page;
  9. int? limit;
  10. @JSONField(name: "count_page")
  11. int? countPage;
  12. List<MypostsSaleRentList>? list;
  13. MypostsSaleRentEntity();
  14. factory MypostsSaleRentEntity.fromJson(Map<String, dynamic> json) => $MypostsSaleRentEntityFromJson(json);
  15. Map<String, dynamic> toJson() => $MypostsSaleRentEntityToJson(this);
  16. @override
  17. String toString() {
  18. return jsonEncode(this);
  19. }
  20. }
  21. @JsonSerializable()
  22. class MypostsSaleRentList {
  23. int? id;
  24. String? title;
  25. int? price;
  26. List<String>? resources;
  27. @JSONField(name: "created_at")
  28. String? createdAt;
  29. @JSONField(name: "likes_count")
  30. int? likesCount;
  31. MypostsSaleRentList();
  32. factory MypostsSaleRentList.fromJson(Map<String, dynamic> json) => $MypostsSaleRentListFromJson(json);
  33. Map<String, dynamic> toJson() => $MypostsSaleRentListToJson(this);
  34. @override
  35. String toString() {
  36. return jsonEncode(this);
  37. }
  38. }