import 'package:domain/generated/json/base/json_field.dart'; import 'package:domain/generated/json/rewards_my_entity.g.dart'; import 'dart:convert'; export 'package:domain/generated/json/rewards_my_entity.g.dart'; @JsonSerializable() class RewardsMyEntity { late int count = 0; late int page = 0; late int limit = 0; @JSONField(name: "count_page") late int countPage = 0; late List list = []; RewardsMyEntity(); factory RewardsMyEntity.fromJson(Map json) => $RewardsMyEntityFromJson(json); Map toJson() => $RewardsMyEntityToJson(this); @override String toString() { return jsonEncode(this); } } @JsonSerializable() class RewardsMyList { late int id = 0; @JSONField(name: "redemption_code") late int redemptionCode = 0; @JSONField(name: "used_at") late String usedAt = ''; late RewardsMyListReward reward; RewardsMyList(); factory RewardsMyList.fromJson(Map json) => $RewardsMyListFromJson(json); Map toJson() => $RewardsMyListToJson(this); @override String toString() { return jsonEncode(this); } } @JsonSerializable() class RewardsMyListReward { late int id = 0; late String title = ''; late List resources = []; @JSONField(name: "original_point") late int originalPoint = 0; late int point = 0; @JSONField(name: "redeemed_start") late String redeemedStart = ''; @JSONField(name: "redeemed_end") late String redeemedEnd = ''; RewardsMyListReward(); factory RewardsMyListReward.fromJson(Map json) => $RewardsMyListRewardFromJson(json); Map toJson() => $RewardsMyListRewardToJson(this); @override String toString() { return jsonEncode(this); } }