12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- 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<String> recent = [];
- late List<String> trending = [];
- late List<RewardsSearchRewards> rewards = [];
- RewardsSearchEntity();
- factory RewardsSearchEntity.fromJson(Map<String, dynamic> json) => $RewardsSearchEntityFromJson(json);
- Map<String, dynamic> toJson() => $RewardsSearchEntityToJson(this);
- @override
- String toString() {
- return jsonEncode(this);
- }
- }
- @JsonSerializable()
- class RewardsSearchRewards {
- late int id = 0;
- late String name = '';
- late List<String> resources = [];
- @JSONField(name: "original_point")
- late int originalPoint = 0;
- late int point = 0;
- RewardsSearchRewards();
- factory RewardsSearchRewards.fromJson(Map<String, dynamic> json) => $RewardsSearchRewardsFromJson(json);
- Map<String, dynamic> toJson() => $RewardsSearchRewardsToJson(this);
- @override
- String toString() {
- return jsonEncode(this);
- }
- }
|