import 'package:domain/generated/json/base/json_field.dart'; import 'package:domain/generated/json/rewards_history_earned_entity.g.dart'; import 'dart:convert'; export 'package:domain/generated/json/rewards_history_earned_entity.g.dart'; @JsonSerializable() class RewardsHistoryEarnedEntity { late int count = 0; late int page = 0; late int limit = 0; @JSONField(name: "count_page") late int countPage = 0; late List list = []; RewardsHistoryEarnedEntity(); factory RewardsHistoryEarnedEntity.fromJson(Map json) => $RewardsHistoryEarnedEntityFromJson(json); Map toJson() => $RewardsHistoryEarnedEntityToJson(this); @override String toString() { return jsonEncode(this); } } @JsonSerializable() class RewardsHistoryEarnedList { late int id = 0; late int point = 0; @JSONField(name: "short_description") late String shortDescription = ''; @JSONField(name: "created_at") late String createdAt = ''; RewardsHistoryEarnedList(); factory RewardsHistoryEarnedList.fromJson(Map json) => $RewardsHistoryEarnedListFromJson(json); Map toJson() => $RewardsHistoryEarnedListToJson(this); @override String toString() { return jsonEncode(this); } }