labour_report_entity.dart 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. import 'package:domain/generated/json/base/json_field.dart';
  2. import 'package:domain/generated/json/labour_report_entity.g.dart';
  3. import 'dart:convert';
  4. export 'package:domain/generated/json/labour_report_entity.g.dart';
  5. @JsonSerializable()
  6. class LabourReportEntity {
  7. List<LabourReportRows> rows = [];
  8. LabourReportTotal? total;
  9. LabourReportEntity();
  10. factory LabourReportEntity.fromJson(Map<String, dynamic> json) => $LabourReportEntityFromJson(json);
  11. Map<String, dynamic> toJson() => $LabourReportEntityToJson(this);
  12. @override
  13. String toString() {
  14. return jsonEncode(this);
  15. }
  16. }
  17. @JsonSerializable()
  18. class LabourReportRows {
  19. @JSONField(name: "outlet_id")
  20. int? outletId = 0;
  21. @JSONField(name: "outlet_name")
  22. String? outletName = null;
  23. String? hrs = null;
  24. @JSONField(name: "ag_amt")
  25. String? agAmt = null;
  26. @JSONField(name: "in_hrs")
  27. String? inHrs = null;
  28. @JSONField(name: "in_ag_amt")
  29. String? inAgAmt = null;
  30. @JSONField(name: "tot_hrs")
  31. String? totHrs = null;
  32. @JSONField(name: "tot_ag_amt")
  33. String? totAgAmt = null;
  34. LabourReportRows();
  35. factory LabourReportRows.fromJson(Map<String, dynamic> json) => $LabourReportRowsFromJson(json);
  36. Map<String, dynamic> toJson() => $LabourReportRowsToJson(this);
  37. @override
  38. String toString() {
  39. return jsonEncode(this);
  40. }
  41. }
  42. @JsonSerializable()
  43. class LabourReportTotal {
  44. String? hrs = null;
  45. @JSONField(name: "ag_amt")
  46. String? agAmt = null;
  47. @JSONField(name: "in_hrs")
  48. String? inHrs = null;
  49. @JSONField(name: "in_ag_amt")
  50. String? inAgAmt = null;
  51. @JSONField(name: "tot_hrs")
  52. String? totHrs = null;
  53. @JSONField(name: "tot_ag_amt")
  54. String? totAgAmt = null;
  55. LabourReportTotal();
  56. factory LabourReportTotal.fromJson(Map<String, dynamic> json) => $LabourReportTotalFromJson(json);
  57. Map<String, dynamic> toJson() => $LabourReportTotalToJson(this);
  58. @override
  59. String toString() {
  60. return jsonEncode(this);
  61. }
  62. }