import 'package:domain/generated/json/base/json_field.dart'; import 'package:domain/generated/json/rewards_home_tes_entity.g.dart'; import 'dart:convert'; export 'package:domain/generated/json/rewards_home_tes_entity.g.dart'; @JsonSerializable() class RewardsHomeTesEntity { late double id; late String name = ''; late List rewards = []; RewardsHomeTesEntity(); factory RewardsHomeTesEntity.fromJson(Map json) => $RewardsHomeTesEntityFromJson(json); Map toJson() => $RewardsHomeTesEntityToJson(this); @override String toString() { return jsonEncode(this); } } @JsonSerializable() class RewardsHomeTesRewards { late double id; late String name = ''; late List resources = []; @JSONField(name: "original_point") late double originalPoint; late double point; RewardsHomeTesRewards(); factory RewardsHomeTesRewards.fromJson(Map json) => $RewardsHomeTesRewardsFromJson(json); Map toJson() => $RewardsHomeTesRewardsToJson(this); @override String toString() { return jsonEncode(this); } }