import 'package:domain/generated/json/base/json_field.dart'; import 'package:domain/generated/json/rewards_detail_entity.g.dart'; import 'dart:convert'; export 'package:domain/generated/json/rewards_detail_entity.g.dart'; @JsonSerializable() class RewardsDetailEntity { 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 = []; RewardsDetailEntity(); factory RewardsDetailEntity.fromJson(Map json) => $RewardsDetailEntityFromJson(json); Map toJson() => $RewardsDetailEntityToJson(this); @override String toString() { return jsonEncode(this); } map(Function(dynamic item) param0) {} } @JsonSerializable() class RewardsDetailRedeemable { late String day = ''; late String time = ''; RewardsDetailRedeemable(); factory RewardsDetailRedeemable.fromJson(Map json) => $RewardsDetailRedeemableFromJson(json); Map toJson() => $RewardsDetailRedeemableToJson(this); @override String toString() { return jsonEncode(this); } }