import 'package:domain/generated/json/base/json_field.dart'; import 'package:domain/generated/json/attendance_entity.g.dart'; import 'dart:convert'; export 'package:domain/generated/json/attendance_entity.g.dart'; @JsonSerializable() class AttendanceEntity { int total = 0; List? rows = []; AttendanceEntity(); factory AttendanceEntity.fromJson(Map json) => $AttendanceEntityFromJson(json); Map toJson() => $AttendanceEntityToJson(this); @override String toString() { return jsonEncode(this); } } @JsonSerializable() class AttendanceList { @JSONField(name: "applied_id") int? appliedId = 0; @JSONField(name: "staff_id") int? staffId = 0; @JSONField(name: "staff_name") String? staffName = ''; @JSONField(name: "job_date") String? jobDate = ''; @JSONField(name: "start_time") String? startTime = ''; @JSONField(name: "end_time") String? endTime = ''; @JSONField(name: "check_in_id") int? checkInId = 0; @JSONField(name: "check_in_time") String? checkInTime = ''; @JSONField(name: "check_in_img") String? checkInImg = ''; @JSONField(name: "check_out_id") int? checkOutId = 0; @JSONField(name: "check_out_time") String? checkOutTime = ''; @JSONField(name: "check_out_img") String? checkOutImg = ''; int? status = 0; @JSONField(name: "status_show") String? statusShow = ''; bool isExpended = false; //是否展开了 AttendanceList(); factory AttendanceList.fromJson(Map json) => $AttendanceListFromJson(json); Map toJson() => $AttendanceListToJson(this); @override String toString() { return jsonEncode(this); } }