1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- 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<String, dynamic> json) =>
- $RewardsBuyEntityFromJson(json);
- Map<String, dynamic> toJson() => $RewardsBuyEntityToJson(this);
- @override
- String toString() {
- return jsonEncode(this);
- }
- }
- @JsonSerializable()
- class RewardsBuyReward {
- late int id = 0;
- late String title = '';
- late List<String> 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<RewardsBuyRewardRedeemable> redeemable = [];
- RewardsBuyReward();
- factory RewardsBuyReward.fromJson(Map<String, dynamic> json) =>
- $RewardsBuyRewardFromJson(json);
- Map<String, dynamic> toJson() => $RewardsBuyRewardToJson(this);
- @override
- String toString() {
- return jsonEncode(this);
- }
- }
- @JsonSerializable()
- class RewardsBuyRewardRedeemable {
- late String day = '';
- late String time = '';
- RewardsBuyRewardRedeemable();
- factory RewardsBuyRewardRedeemable.fromJson(Map<String, dynamic> json) => $RewardsBuyRewardRedeemableFromJson(json);
- Map<String, dynamic> toJson() => $RewardsBuyRewardRedeemableToJson(this);
- @override
- String toString() {
- return jsonEncode(this);
- }
- }
|