fiance_report_entity.dart 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import 'package:domain/generated/json/base/json_field.dart';
  2. import 'package:domain/generated/json/fiance_report_entity.g.dart';
  3. import 'dart:convert';
  4. export 'package:domain/generated/json/fiance_report_entity.g.dart';
  5. @JsonSerializable()
  6. class FianceReportEntity {
  7. @JSONField(name: "rate_list")
  8. List<FianceReportRateList> rateList = [];
  9. @JSONField(name: "request_total")
  10. int requestTotal = 0;
  11. @JSONField(name: "actual_total")
  12. int actualTotal = 0;
  13. FianceReportEntity();
  14. factory FianceReportEntity.fromJson(Map<String, dynamic> json) => $FianceReportEntityFromJson(json);
  15. Map<String, dynamic> toJson() => $FianceReportEntityToJson(this);
  16. @override
  17. String toString() {
  18. return jsonEncode(this);
  19. }
  20. }
  21. @JsonSerializable()
  22. class FianceReportRateList {
  23. String? day = null;
  24. @JSONField(name: "week_num")
  25. String? weekNum = null;
  26. @JSONField(name: "week_str")
  27. String? weekStr = null;
  28. int request = 0;
  29. int actual = 0;
  30. String? ratio = null;
  31. FianceReportRateList();
  32. factory FianceReportRateList.fromJson(Map<String, dynamic> json) => $FianceReportRateListFromJson(json);
  33. Map<String, dynamic> toJson() => $FianceReportRateListToJson(this);
  34. @override
  35. String toString() {
  36. return jsonEncode(this);
  37. }
  38. }