import 'package:domain/generated/json/base/json_field.dart'; import 'package:domain/generated/json/rewards_list_entity.g.dart'; import 'dart:convert'; export 'package:domain/generated/json/rewards_list_entity.g.dart'; @JsonSerializable() class RewardsListEntity { late int count = 0; late int page = 0; late int limit = 0; @JSONField(name: "count_page") late int countPage = 0; late List list = []; RewardsListEntity(); factory RewardsListEntity.fromJson(Map json) => $RewardsListEntityFromJson(json); Map toJson() => $RewardsListEntityToJson(this); @override String toString() { return jsonEncode(this); } } @JsonSerializable() class RewardsListList { late int id = 0; late String name = ''; late List resources = []; @JSONField(name: "original_point") late int originalPoint = 0; late int point = 0; RewardsListList(); factory RewardsListList.fromJson(Map json) => $RewardsListListFromJson(json); Map toJson() => $RewardsListListToJson(this); @override String toString() { return jsonEncode(this); } }