import 'package:domain/generated/json/base/json_field.dart'; import 'package:domain/generated/json/rewards_buy_entity.g.dart'; import 'dart:convert'; export 'package:domain/generated/json/rewards_buy_entity.g.dart'; @JsonSerializable() class RewardsBuyEntity { late int id = 0; @JSONField(name: "created_at") late String createdAt = ''; late RewardsBuyReward reward; RewardsBuyEntity(); factory RewardsBuyEntity.fromJson(Map json) => $RewardsBuyEntityFromJson(json); Map toJson() => $RewardsBuyEntityToJson(this); @override String toString() { return jsonEncode(this); } } @JsonSerializable() class RewardsBuyReward { late int id = 0; late String title = ''; late List resources = []; @JSONField(name: "original_point") late int originalPoint = 0; late int point = 0; late String description = ''; late bool reservation = false; late String start = ''; late String end = ''; @JSONField(name: "redeemed_start") late String redeemedStart = ''; @JSONField(name: "redeemed_end") late String redeemedEnd = ''; late String package = ''; late String notice = ''; @JSONField(name: "created_at") late String createdAt = ''; late List redeemable = []; RewardsBuyReward(); factory RewardsBuyReward.fromJson(Map json) => $RewardsBuyRewardFromJson(json); Map toJson() => $RewardsBuyRewardToJson(this); @override String toString() { return jsonEncode(this); } } @JsonSerializable() class RewardsBuyRewardRedeemable { late String day = ''; late String time = ''; RewardsBuyRewardRedeemable(); factory RewardsBuyRewardRedeemable.fromJson(Map json) => $RewardsBuyRewardRedeemableFromJson(json); Map toJson() => $RewardsBuyRewardRedeemableToJson(this); @override String toString() { return jsonEncode(this); } }