import 'package:domain/generated/json/base/json_convert_content.dart'; import 'package:domain/entity/response/attendance_review_entity.dart'; AttendanceReviewEntity $AttendanceReviewEntityFromJson(Map json) { final AttendanceReviewEntity attendanceReviewEntity = AttendanceReviewEntity(); final int? total = jsonConvert.convert(json['total']); if (total != null) { attendanceReviewEntity.total = total; } final List? rows = (json['rows'] as List?)?.map( (e) => jsonConvert.convert(e) as AttendanceReviewRows).toList(); if (rows != null) { attendanceReviewEntity.rows = rows; } return attendanceReviewEntity; } Map $AttendanceReviewEntityToJson(AttendanceReviewEntity entity) { final Map data = {}; data['total'] = entity.total; data['rows'] = entity.rows.map((v) => v.toJson()).toList(); return data; } extension AttendanceReviewEntityExtension on AttendanceReviewEntity { AttendanceReviewEntity copyWith({ int? total, List? rows, }) { return AttendanceReviewEntity() ..total = total ?? this.total ..rows = rows ?? this.rows; } } AttendanceReviewRows $AttendanceReviewRowsFromJson(Map json) { final AttendanceReviewRows attendanceReviewRows = AttendanceReviewRows(); final String? recordId = jsonConvert.convert(json['record_id']); if (recordId != null) { attendanceReviewRows.recordId = recordId; } final String? orderId = jsonConvert.convert(json['order_id']); if (orderId != null) { attendanceReviewRows.orderId = orderId; } final String? appliedId = jsonConvert.convert(json['applied_id']); if (appliedId != null) { attendanceReviewRows.appliedId = appliedId; } final String? staffName = jsonConvert.convert(json['staff_name']); if (staffName != null) { attendanceReviewRows.staffName = staffName; } final String? jobTitle = jsonConvert.convert(json['job_title']); if (jobTitle != null) { attendanceReviewRows.jobTitle = jobTitle; } final String? departmentName = jsonConvert.convert(json['department_name']); if (departmentName != null) { attendanceReviewRows.departmentName = departmentName; } final String? jobTime = jsonConvert.convert(json['job_time']); if (jobTime != null) { attendanceReviewRows.jobTime = jobTime; } final String? statusShow = jsonConvert.convert(json['status_show']); if (statusShow != null) { attendanceReviewRows.statusShow = statusShow; } final String? adjustShow = jsonConvert.convert(json['adjust_show']); if (adjustShow != null) { attendanceReviewRows.adjustShow = adjustShow; } final String? totalShow = jsonConvert.convert(json['total_show']); if (totalShow != null) { attendanceReviewRows.totalShow = totalShow; } final String? clockIn = jsonConvert.convert(json['clock_in']); if (clockIn != null) { attendanceReviewRows.clockIn = clockIn; } final int? inClass = jsonConvert.convert(json['in_class']); if (inClass != null) { attendanceReviewRows.inClass = inClass; } final String? clockOut = jsonConvert.convert(json['clock_out']); if (clockOut != null) { attendanceReviewRows.clockOut = clockOut; } final int? outClass = jsonConvert.convert(json['out_class']); if (outClass != null) { attendanceReviewRows.outClass = outClass; } final String? createdAt = jsonConvert.convert(json['created_at']); if (createdAt != null) { attendanceReviewRows.createdAt = createdAt; } final int? hasReason = jsonConvert.convert(json['has_reason']); if (hasReason != null) { attendanceReviewRows.hasReason = hasReason; } final bool? isSelected = jsonConvert.convert(json['isSelected']); if (isSelected != null) { attendanceReviewRows.isSelected = isSelected; } return attendanceReviewRows; } Map $AttendanceReviewRowsToJson(AttendanceReviewRows entity) { final Map data = {}; data['record_id'] = entity.recordId; data['order_id'] = entity.orderId; data['applied_id'] = entity.appliedId; data['staff_name'] = entity.staffName; data['job_title'] = entity.jobTitle; data['department_name'] = entity.departmentName; data['job_time'] = entity.jobTime; data['status_show'] = entity.statusShow; data['adjust_show'] = entity.adjustShow; data['total_show'] = entity.totalShow; data['clock_in'] = entity.clockIn; data['in_class'] = entity.inClass; data['clock_out'] = entity.clockOut; data['out_class'] = entity.outClass; data['created_at'] = entity.createdAt; data['has_reason'] = entity.hasReason; data['isSelected'] = entity.isSelected; return data; } extension AttendanceReviewRowsExtension on AttendanceReviewRows { AttendanceReviewRows copyWith({ String? recordId, String? orderId, String? appliedId, String? staffName, String? jobTitle, String? departmentName, String? jobTime, String? statusShow, String? adjustShow, String? totalShow, String? clockIn, int? inClass, String? clockOut, int? outClass, String? createdAt, int? hasReason, bool? isSelected, }) { return AttendanceReviewRows() ..recordId = recordId ?? this.recordId ..orderId = orderId ?? this.orderId ..appliedId = appliedId ?? this.appliedId ..staffName = staffName ?? this.staffName ..jobTitle = jobTitle ?? this.jobTitle ..departmentName = departmentName ?? this.departmentName ..jobTime = jobTime ?? this.jobTime ..statusShow = statusShow ?? this.statusShow ..adjustShow = adjustShow ?? this.adjustShow ..totalShow = totalShow ?? this.totalShow ..clockIn = clockIn ?? this.clockIn ..inClass = inClass ?? this.inClass ..clockOut = clockOut ?? this.clockOut ..outClass = outClass ?? this.outClass ..createdAt = createdAt ?? this.createdAt ..hasReason = hasReason ?? this.hasReason ..isSelected = isSelected ?? this.isSelected; } }