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

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

	RewardsHistoryEarnedEntity();

	factory RewardsHistoryEarnedEntity.fromJson(Map<String, dynamic> json) => $RewardsHistoryEarnedEntityFromJson(json);

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

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

@JsonSerializable()
class RewardsHistoryEarnedList {
	late int id = 0;
	late int point = 0;
	@JSONField(name: "short_description")
	late String shortDescription = '';
	@JSONField(name: "created_at")
	late String createdAt = '';

	RewardsHistoryEarnedList();

	factory RewardsHistoryEarnedList.fromJson(Map<String, dynamic> json) => $RewardsHistoryEarnedListFromJson(json);

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

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