rewards_history_earned_entity.dart 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import 'package:domain/generated/json/base/json_field.dart';
  2. import 'package:domain/generated/json/rewards_history_earned_entity.g.dart';
  3. import 'dart:convert';
  4. export 'package:domain/generated/json/rewards_history_earned_entity.g.dart';
  5. @JsonSerializable()
  6. class RewardsHistoryEarnedEntity {
  7. late int count = 0;
  8. late int page = 0;
  9. late int limit = 0;
  10. @JSONField(name: "count_page")
  11. late int countPage = 0;
  12. late List<RewardsHistoryEarnedList> list = [];
  13. RewardsHistoryEarnedEntity();
  14. factory RewardsHistoryEarnedEntity.fromJson(Map<String, dynamic> json) => $RewardsHistoryEarnedEntityFromJson(json);
  15. Map<String, dynamic> toJson() => $RewardsHistoryEarnedEntityToJson(this);
  16. @override
  17. String toString() {
  18. return jsonEncode(this);
  19. }
  20. }
  21. @JsonSerializable()
  22. class RewardsHistoryEarnedList {
  23. late int id = 0;
  24. late int point = 0;
  25. @JSONField(name: "short_description")
  26. late String shortDescription = '';
  27. @JSONField(name: "created_at")
  28. late String createdAt = '';
  29. RewardsHistoryEarnedList();
  30. factory RewardsHistoryEarnedList.fromJson(Map<String, dynamic> json) => $RewardsHistoryEarnedListFromJson(json);
  31. Map<String, dynamic> toJson() => $RewardsHistoryEarnedListToJson(this);
  32. @override
  33. String toString() {
  34. return jsonEncode(this);
  35. }
  36. }