import 'package:domain/generated/json/base/json_field.dart';
import 'package:domain/generated/json/rewards_list_entity.g.dart';
import 'dart:convert';
export 'package:domain/generated/json/rewards_list_entity.g.dart';

@JsonSerializable()
class RewardsListEntity {
	late int count = 0;
	late int page = 0;
	late int limit = 0;
	@JSONField(name: "count_page")
	late int countPage = 0;
	late List<RewardsListList> list = [];

	RewardsListEntity();

	factory RewardsListEntity.fromJson(Map<String, dynamic> json) => $RewardsListEntityFromJson(json);

	Map<String, dynamic> toJson() => $RewardsListEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class RewardsListList {
	late int id = 0;
	late String name = '';
	late List<String> resources = [];
	@JSONField(name: "original_point")
	late int originalPoint = 0;
	late int point = 0;

	RewardsListList();

	factory RewardsListList.fromJson(Map<String, dynamic> json) => $RewardsListListFromJson(json);

	Map<String, dynamic> toJson() => $RewardsListListToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}