12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- import 'package:domain/generated/json/base/json_field.dart';
- import 'package:domain/generated/json/rewards_index_entity.g.dart';
- import 'dart:convert';
- export 'package:domain/generated/json/rewards_index_entity.g.dart';
- @JsonSerializable()
- class RewardsIndexEntity {
- late int points = 0;
- late RewardsIndexContinuous continuous;
- late RewardsIndexTasks tasks;
- late List<dynamic> latest = [];
- RewardsIndexEntity();
- factory RewardsIndexEntity.fromJson(Map<String, dynamic> json) => $RewardsIndexEntityFromJson(json);
- Map<String, dynamic> toJson() => $RewardsIndexEntityToJson(this);
- @override
- String toString() {
- return jsonEncode(this);
- }
- }
- @JsonSerializable()
- class RewardsIndexContinuous {
- late int count = 0;
- @JSONField(name: "current_week_checkin")
- late List<dynamic> currentWeekCheckin = [];
- RewardsIndexContinuous();
- factory RewardsIndexContinuous.fromJson(Map<String, dynamic> json) => $RewardsIndexContinuousFromJson(json);
- Map<String, dynamic> toJson() => $RewardsIndexContinuousToJson(this);
- @override
- String toString() {
- return jsonEncode(this);
- }
- }
- @JsonSerializable()
- class RewardsIndexTasks {
- @JSONField(name: "daily_checkin")
- late bool dailyCheckin = false;
- @JSONField(name: "news_feed_post")
- late bool newsFeedPost = false;
- @JSONField(name: "give_10_likes")
- late int give10Likes = 0;
- RewardsIndexTasks();
- factory RewardsIndexTasks.fromJson(Map<String, dynamic> json) => $RewardsIndexTasksFromJson(json);
- Map<String, dynamic> toJson() => $RewardsIndexTasksToJson(this);
- @override
- String toString() {
- return jsonEncode(this);
- }
- }
|