import 'package:domain/generated/json/base/json_convert_content.dart'; import 'package:domain/entity/response/labour_review_status_entity.dart'; LabourReviewStatusEntity $LabourReviewStatusEntityFromJson(Map json) { final LabourReviewStatusEntity labourReviewStatusEntity = LabourReviewStatusEntity(); final int? coDepartmentId = jsonConvert.convert(json['co_department_id']); if (coDepartmentId != null) { labourReviewStatusEntity.coDepartmentId = coDepartmentId; } final List? records = (json['records'] as List?)?.map( (e) => jsonConvert.convert(e) as LabourReviewStatusRecords).toList(); if (records != null) { labourReviewStatusEntity.records = records; } return labourReviewStatusEntity; } Map $LabourReviewStatusEntityToJson(LabourReviewStatusEntity entity) { final Map data = {}; data['co_department_id'] = entity.coDepartmentId; data['records'] = entity.records.map((v) => v.toJson()).toList(); return data; } extension LabourReviewStatusEntityExtension on LabourReviewStatusEntity { LabourReviewStatusEntity copyWith({ int? coDepartmentId, List? records, }) { return LabourReviewStatusEntity() ..coDepartmentId = coDepartmentId ?? this.coDepartmentId ..records = records ?? this.records; } } LabourReviewStatusRecords $LabourReviewStatusRecordsFromJson(Map json) { final LabourReviewStatusRecords labourReviewStatusRecords = LabourReviewStatusRecords(); final String? serialNumber = jsonConvert.convert(json['serial_number']); if (serialNumber != null) { labourReviewStatusRecords.serialNumber = serialNumber; } final String? nodeName = jsonConvert.convert(json['node_name']); if (nodeName != null) { labourReviewStatusRecords.nodeName = nodeName; } final String? statusShow = jsonConvert.convert(json['status_show']); if (statusShow != null) { labourReviewStatusRecords.statusShow = statusShow; } final String? auditName = jsonConvert.convert(json['audit_name']); if (auditName != null) { labourReviewStatusRecords.auditName = auditName; } final String? auditTime = jsonConvert.convert(json['audit_time']); if (auditTime != null) { labourReviewStatusRecords.auditTime = auditTime; } final dynamic auditMark = json['audit_mark']; if (auditMark != null) { labourReviewStatusRecords.auditMark = auditMark; } final String? createdAt = jsonConvert.convert(json['created_at']); if (createdAt != null) { labourReviewStatusRecords.createdAt = createdAt; } final String? assigneeTypeShow = jsonConvert.convert(json['assignee_type_show']); if (assigneeTypeShow != null) { labourReviewStatusRecords.assigneeTypeShow = assigneeTypeShow; } final String? designationShow = jsonConvert.convert(json['designation_show']); if (designationShow != null) { labourReviewStatusRecords.designationShow = designationShow; } return labourReviewStatusRecords; } Map $LabourReviewStatusRecordsToJson(LabourReviewStatusRecords entity) { final Map data = {}; data['serial_number'] = entity.serialNumber; data['node_name'] = entity.nodeName; data['status_show'] = entity.statusShow; data['audit_name'] = entity.auditName; data['audit_time'] = entity.auditTime; data['audit_mark'] = entity.auditMark; data['created_at'] = entity.createdAt; data['assignee_type_show'] = entity.assigneeTypeShow; data['designation_show'] = entity.designationShow; return data; } extension LabourReviewStatusRecordsExtension on LabourReviewStatusRecords { LabourReviewStatusRecords copyWith({ String? serialNumber, String? nodeName, String? statusShow, String? auditName, String? auditTime, dynamic auditMark, String? createdAt, String? assigneeTypeShow, String? designationShow, }) { return LabourReviewStatusRecords() ..serialNumber = serialNumber ?? this.serialNumber ..nodeName = nodeName ?? this.nodeName ..statusShow = statusShow ?? this.statusShow ..auditName = auditName ?? this.auditName ..auditTime = auditTime ?? this.auditTime ..auditMark = auditMark ?? this.auditMark ..createdAt = createdAt ?? this.createdAt ..assigneeTypeShow = assigneeTypeShow ?? this.assigneeTypeShow ..designationShow = designationShow ?? this.designationShow; } }