import 'package:domain/generated/json/base/json_field.dart'; import 'package:domain/generated/json/labour_report_entity.g.dart'; import 'dart:convert'; export 'package:domain/generated/json/labour_report_entity.g.dart'; @JsonSerializable() class LabourReportEntity { List rows = []; LabourReportTotal? total; LabourReportEntity(); factory LabourReportEntity.fromJson(Map json) => $LabourReportEntityFromJson(json); Map toJson() => $LabourReportEntityToJson(this); @override String toString() { return jsonEncode(this); } } @JsonSerializable() class LabourReportRows { @JSONField(name: "outlet_id") int? outletId = 0; @JSONField(name: "outlet_name") String? outletName = null; String? hrs = null; @JSONField(name: "ag_amt") String? agAmt = null; @JSONField(name: "in_hrs") String? inHrs = null; @JSONField(name: "in_ag_amt") String? inAgAmt = null; @JSONField(name: "tot_hrs") String? totHrs = null; @JSONField(name: "tot_ag_amt") String? totAgAmt = null; LabourReportRows(); factory LabourReportRows.fromJson(Map json) => $LabourReportRowsFromJson(json); Map toJson() => $LabourReportRowsToJson(this); @override String toString() { return jsonEncode(this); } } @JsonSerializable() class LabourReportTotal { String? hrs = null; @JSONField(name: "ag_amt") String? agAmt = null; @JSONField(name: "in_hrs") String? inHrs = null; @JSONField(name: "in_ag_amt") String? inAgAmt = null; @JSONField(name: "tot_hrs") String? totHrs = null; @JSONField(name: "tot_ag_amt") String? totAgAmt = null; LabourReportTotal(); factory LabourReportTotal.fromJson(Map json) => $LabourReportTotalFromJson(json); Map toJson() => $LabourReportTotalToJson(this); @override String toString() { return jsonEncode(this); } }