rewards_detail_entity.dart 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. import 'package:domain/generated/json/base/json_field.dart';
  2. import 'package:domain/generated/json/rewards_detail_entity.g.dart';
  3. import 'dart:convert';
  4. export 'package:domain/generated/json/rewards_detail_entity.g.dart';
  5. @JsonSerializable()
  6. class RewardsDetailEntity {
  7. late int id = 0;
  8. late String title = '';
  9. late List<String> resources = [];
  10. @JSONField(name: "original_point")
  11. late int originalPoint = 0;
  12. late int point = 0;
  13. late String description = '';
  14. late bool reservation = false;
  15. late String start = '';
  16. late String end = '';
  17. @JSONField(name: "redeemed_start")
  18. late String redeemedStart = '';
  19. @JSONField(name: "redeemed_end")
  20. late String redeemedEnd = '';
  21. late String package = '';
  22. late String notice = '';
  23. @JSONField(name: "created_at")
  24. late String createdAt = '';
  25. late List<RewardsDetailRedeemable> redeemable = [];
  26. RewardsDetailEntity();
  27. factory RewardsDetailEntity.fromJson(Map<String, dynamic> json) => $RewardsDetailEntityFromJson(json);
  28. Map<String, dynamic> toJson() => $RewardsDetailEntityToJson(this);
  29. @override
  30. String toString() {
  31. return jsonEncode(this);
  32. }
  33. map(Function(dynamic item) param0) {}
  34. }
  35. @JsonSerializable()
  36. class RewardsDetailRedeemable {
  37. late String day = '';
  38. late String time = '';
  39. RewardsDetailRedeemable();
  40. factory RewardsDetailRedeemable.fromJson(Map<String, dynamic> json) => $RewardsDetailRedeemableFromJson(json);
  41. Map<String, dynamic> toJson() => $RewardsDetailRedeemableToJson(this);
  42. @override
  43. String toString() {
  44. return jsonEncode(this);
  45. }
  46. }