12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- 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<RewardsHomeTesRewards> rewards = [];
- RewardsHomeTesEntity();
- factory RewardsHomeTesEntity.fromJson(Map<String, dynamic> json) =>
- $RewardsHomeTesEntityFromJson(json);
- Map<String, dynamic> toJson() => $RewardsHomeTesEntityToJson(this);
- @override
- String toString() {
- return jsonEncode(this);
- }
- }
- @JsonSerializable()
- class RewardsHomeTesRewards {
- late double id;
- late String name = '';
- late List<String> resources = [];
- @JSONField(name: "original_point")
- late double originalPoint;
- late double point;
- RewardsHomeTesRewards();
- factory RewardsHomeTesRewards.fromJson(Map<String, dynamic> json) =>
- $RewardsHomeTesRewardsFromJson(json);
- Map<String, dynamic> toJson() => $RewardsHomeTesRewardsToJson(this);
- @override
- String toString() {
- return jsonEncode(this);
- }
- }
|