import 'package:domain/generated/json/base/json_field.dart'; import 'package:domain/generated/json/rewards_search_entity.g.dart'; import 'dart:convert'; export 'package:domain/generated/json/rewards_search_entity.g.dart'; @JsonSerializable() class RewardsSearchEntity { late List recent = []; late List trending = []; late List rewards = []; RewardsSearchEntity(); factory RewardsSearchEntity.fromJson(Map json) => $RewardsSearchEntityFromJson(json); Map toJson() => $RewardsSearchEntityToJson(this); @override String toString() { return jsonEncode(this); } } @JsonSerializable() class RewardsSearchRewards { late int id = 0; late String name = ''; late List resources = []; @JSONField(name: "original_point") late int originalPoint = 0; late int point = 0; RewardsSearchRewards(); factory RewardsSearchRewards.fromJson(Map json) => $RewardsSearchRewardsFromJson(json); Map toJson() => $RewardsSearchRewardsToJson(this); @override String toString() { return jsonEncode(this); } }