garage_sale_rent_detail_entity.dart 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import 'package:domain/generated/json/base/json_field.dart';
  2. import 'package:domain/generated/json/garage_sale_rent_detail_entity.g.dart';
  3. import 'dart:convert';
  4. export 'package:domain/generated/json/garage_sale_rent_detail_entity.g.dart';
  5. @JsonSerializable()
  6. class GarageSaleRentDetailEntity {
  7. int? id;
  8. String? title;
  9. int? price;
  10. String? description;
  11. List<String>? resources;
  12. @JSONField(name: "created_at")
  13. String? createdAt;
  14. @JSONField(name: "likes_count")
  15. int? likesCount;
  16. String? contact;
  17. GarageSaleRentDetailAccount? account;
  18. GarageSaleRentDetailEntity();
  19. factory GarageSaleRentDetailEntity.fromJson(Map<String, dynamic> json) => $GarageSaleRentDetailEntityFromJson(json);
  20. Map<String, dynamic> toJson() => $GarageSaleRentDetailEntityToJson(this);
  21. @override
  22. String toString() {
  23. return jsonEncode(this);
  24. }
  25. }
  26. @JsonSerializable()
  27. class GarageSaleRentDetailAccount {
  28. int? id;
  29. String? name;
  30. String? avatar;
  31. GarageSaleRentDetailAccount();
  32. factory GarageSaleRentDetailAccount.fromJson(Map<String, dynamic> json) => $GarageSaleRentDetailAccountFromJson(json);
  33. Map<String, dynamic> toJson() => $GarageSaleRentDetailAccountToJson(this);
  34. @override
  35. String toString() {
  36. return jsonEncode(this);
  37. }
  38. }