|
@@ -0,0 +1,426 @@
|
|
|
+import 'package:domain/generated/json/base/json_convert_content.dart';
|
|
|
+import 'package:domain/entity/response/uk_labour_review_status_entity.dart';
|
|
|
+
|
|
|
+UkLabourReviewStatusEntity $UkLabourReviewStatusEntityFromJson(
|
|
|
+ Map<String, dynamic> json) {
|
|
|
+ final UkLabourReviewStatusEntity ukLabourReviewStatusEntity = UkLabourReviewStatusEntity();
|
|
|
+ final UkLabourReviewStatusRow? row = jsonConvert.convert<
|
|
|
+ UkLabourReviewStatusRow>(json['row']);
|
|
|
+ if (row != null) {
|
|
|
+ ukLabourReviewStatusEntity.row = row;
|
|
|
+ }
|
|
|
+ final int? coDepartmentId = jsonConvert.convert<int>(
|
|
|
+ json['co_department_id']);
|
|
|
+ if (coDepartmentId != null) {
|
|
|
+ ukLabourReviewStatusEntity.coDepartmentId = coDepartmentId;
|
|
|
+ }
|
|
|
+ final List<UkLabourReviewStatusRecords>? records = (json['records'] as List<
|
|
|
+ dynamic>?)?.map(
|
|
|
+ (e) =>
|
|
|
+ jsonConvert.convert<UkLabourReviewStatusRecords>(
|
|
|
+ e) as UkLabourReviewStatusRecords).toList();
|
|
|
+ if (records != null) {
|
|
|
+ ukLabourReviewStatusEntity.records = records;
|
|
|
+ }
|
|
|
+ return ukLabourReviewStatusEntity;
|
|
|
+}
|
|
|
+
|
|
|
+Map<String, dynamic> $UkLabourReviewStatusEntityToJson(
|
|
|
+ UkLabourReviewStatusEntity entity) {
|
|
|
+ final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
+ data['row'] = entity.row?.toJson();
|
|
|
+ data['co_department_id'] = entity.coDepartmentId;
|
|
|
+ data['records'] = entity.records?.map((v) => v.toJson()).toList();
|
|
|
+ return data;
|
|
|
+}
|
|
|
+
|
|
|
+extension UkLabourReviewStatusEntityExtension on UkLabourReviewStatusEntity {
|
|
|
+ UkLabourReviewStatusEntity copyWith({
|
|
|
+ UkLabourReviewStatusRow? row,
|
|
|
+ int? coDepartmentId,
|
|
|
+ List<UkLabourReviewStatusRecords>? records,
|
|
|
+ }) {
|
|
|
+ return UkLabourReviewStatusEntity()
|
|
|
+ ..row = row ?? this.row
|
|
|
+ ..coDepartmentId = coDepartmentId ?? this.coDepartmentId
|
|
|
+ ..records = records ?? this.records;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+UkLabourReviewStatusRow $UkLabourReviewStatusRowFromJson(
|
|
|
+ Map<String, dynamic> json) {
|
|
|
+ final UkLabourReviewStatusRow ukLabourReviewStatusRow = UkLabourReviewStatusRow();
|
|
|
+ final int? id = jsonConvert.convert<int>(json['id']);
|
|
|
+ if (id != null) {
|
|
|
+ ukLabourReviewStatusRow.id = id;
|
|
|
+ }
|
|
|
+ final int? employerAdminId = jsonConvert.convert<int>(
|
|
|
+ json['employer_admin_id']);
|
|
|
+ if (employerAdminId != null) {
|
|
|
+ ukLabourReviewStatusRow.employerAdminId = employerAdminId;
|
|
|
+ }
|
|
|
+ final String? jobTitle = jsonConvert.convert<String>(json['job_title']);
|
|
|
+ if (jobTitle != null) {
|
|
|
+ ukLabourReviewStatusRow.jobTitle = jobTitle;
|
|
|
+ }
|
|
|
+ final int? needNum = jsonConvert.convert<int>(json['need_num']);
|
|
|
+ if (needNum != null) {
|
|
|
+ ukLabourReviewStatusRow.needNum = needNum;
|
|
|
+ }
|
|
|
+ final String? jobStart = jsonConvert.convert<String>(json['job_start']);
|
|
|
+ if (jobStart != null) {
|
|
|
+ ukLabourReviewStatusRow.jobStart = jobStart;
|
|
|
+ }
|
|
|
+ final String? jobEnd = jsonConvert.convert<String>(json['job_end']);
|
|
|
+ if (jobEnd != null) {
|
|
|
+ ukLabourReviewStatusRow.jobEnd = jobEnd;
|
|
|
+ }
|
|
|
+ final int? jobId = jsonConvert.convert<int>(json['job_id']);
|
|
|
+ if (jobId != null) {
|
|
|
+ ukLabourReviewStatusRow.jobId = jobId;
|
|
|
+ }
|
|
|
+ final int? remarkId = jsonConvert.convert<int>(json['remark_id']);
|
|
|
+ if (remarkId != null) {
|
|
|
+ ukLabourReviewStatusRow.remarkId = remarkId;
|
|
|
+ }
|
|
|
+ final String? status = jsonConvert.convert<String>(json['status']);
|
|
|
+ if (status != null) {
|
|
|
+ ukLabourReviewStatusRow.status = status;
|
|
|
+ }
|
|
|
+ final String? addTime = jsonConvert.convert<String>(json['add_time']);
|
|
|
+ if (addTime != null) {
|
|
|
+ ukLabourReviewStatusRow.addTime = addTime;
|
|
|
+ }
|
|
|
+ final String? from = jsonConvert.convert<String>(json['from']);
|
|
|
+ if (from != null) {
|
|
|
+ ukLabourReviewStatusRow.from = from;
|
|
|
+ }
|
|
|
+ final dynamic rejectReason = json['reject_reason'];
|
|
|
+ if (rejectReason != null) {
|
|
|
+ ukLabourReviewStatusRow.rejectReason = rejectReason;
|
|
|
+ }
|
|
|
+ final dynamic banquet = json['banquet'];
|
|
|
+ if (banquet != null) {
|
|
|
+ ukLabourReviewStatusRow.banquet = banquet;
|
|
|
+ }
|
|
|
+ final int? hotelJobId = jsonConvert.convert<int>(json['hotel_job_id']);
|
|
|
+ if (hotelJobId != null) {
|
|
|
+ ukLabourReviewStatusRow.hotelJobId = hotelJobId;
|
|
|
+ }
|
|
|
+ final String? workContent = jsonConvert.convert<String>(json['work_content']);
|
|
|
+ if (workContent != null) {
|
|
|
+ ukLabourReviewStatusRow.workContent = workContent;
|
|
|
+ }
|
|
|
+ final double? hourlyRate = jsonConvert.convert<double>(json['hourly_rate']);
|
|
|
+ if (hourlyRate != null) {
|
|
|
+ ukLabourReviewStatusRow.hourlyRate = hourlyRate;
|
|
|
+ }
|
|
|
+ final int? coDepartmentId = jsonConvert.convert<int>(
|
|
|
+ json['co_department_id']);
|
|
|
+ if (coDepartmentId != null) {
|
|
|
+ ukLabourReviewStatusRow.coDepartmentId = coDepartmentId;
|
|
|
+ }
|
|
|
+ final int? coStatus = jsonConvert.convert<int>(json['co_status']);
|
|
|
+ if (coStatus != null) {
|
|
|
+ ukLabourReviewStatusRow.coStatus = coStatus;
|
|
|
+ }
|
|
|
+ final int? coTemplateId = jsonConvert.convert<int>(json['co_template_id']);
|
|
|
+ if (coTemplateId != null) {
|
|
|
+ ukLabourReviewStatusRow.coTemplateId = coTemplateId;
|
|
|
+ }
|
|
|
+ final dynamic coApprovedAt = json['co_approved_at'];
|
|
|
+ if (coApprovedAt != null) {
|
|
|
+ ukLabourReviewStatusRow.coApprovedAt = coApprovedAt;
|
|
|
+ }
|
|
|
+ final int? serviceType = jsonConvert.convert<int>(json['service_type']);
|
|
|
+ if (serviceType != null) {
|
|
|
+ ukLabourReviewStatusRow.serviceType = serviceType;
|
|
|
+ }
|
|
|
+ final String? jobUnit = jsonConvert.convert<String>(json['job_unit']);
|
|
|
+ if (jobUnit != null) {
|
|
|
+ ukLabourReviewStatusRow.jobUnit = jobUnit;
|
|
|
+ }
|
|
|
+ final String? agencyRate = jsonConvert.convert<String>(json['agency_rate']);
|
|
|
+ if (agencyRate != null) {
|
|
|
+ ukLabourReviewStatusRow.agencyRate = agencyRate;
|
|
|
+ }
|
|
|
+ final String? location = jsonConvert.convert<String>(json['location']);
|
|
|
+ if (location != null) {
|
|
|
+ ukLabourReviewStatusRow.location = location;
|
|
|
+ }
|
|
|
+ final String? vehicle = jsonConvert.convert<String>(json['vehicle']);
|
|
|
+ if (vehicle != null) {
|
|
|
+ ukLabourReviewStatusRow.vehicle = vehicle;
|
|
|
+ }
|
|
|
+ final int? sourceType = jsonConvert.convert<int>(json['source_type']);
|
|
|
+ if (sourceType != null) {
|
|
|
+ ukLabourReviewStatusRow.sourceType = sourceType;
|
|
|
+ }
|
|
|
+ final int? agencyId = jsonConvert.convert<int>(json['agency_id']);
|
|
|
+ if (agencyId != null) {
|
|
|
+ ukLabourReviewStatusRow.agencyId = agencyId;
|
|
|
+ }
|
|
|
+ final String? agencyName = jsonConvert.convert<String>(json['agency_name']);
|
|
|
+ if (agencyName != null) {
|
|
|
+ ukLabourReviewStatusRow.agencyName = agencyName;
|
|
|
+ }
|
|
|
+ final dynamic employmentType = json['employment_type'];
|
|
|
+ if (employmentType != null) {
|
|
|
+ ukLabourReviewStatusRow.employmentType = employmentType;
|
|
|
+ }
|
|
|
+ final dynamic eventName = json['event_name'];
|
|
|
+ if (eventName != null) {
|
|
|
+ ukLabourReviewStatusRow.eventName = eventName;
|
|
|
+ }
|
|
|
+ final dynamic eventType = json['event_type'];
|
|
|
+ if (eventType != null) {
|
|
|
+ ukLabourReviewStatusRow.eventType = eventType;
|
|
|
+ }
|
|
|
+ final int? passengers = jsonConvert.convert<int>(json['passengers']);
|
|
|
+ if (passengers != null) {
|
|
|
+ ukLabourReviewStatusRow.passengers = passengers;
|
|
|
+ }
|
|
|
+ final dynamic estRevenue = json['est_revenue'];
|
|
|
+ if (estRevenue != null) {
|
|
|
+ ukLabourReviewStatusRow.estRevenue = estRevenue;
|
|
|
+ }
|
|
|
+ final dynamic position = json['position'];
|
|
|
+ if (position != null) {
|
|
|
+ ukLabourReviewStatusRow.position = position;
|
|
|
+ }
|
|
|
+ final dynamic estCost = json['est_cost'];
|
|
|
+ if (estCost != null) {
|
|
|
+ ukLabourReviewStatusRow.estCost = estCost;
|
|
|
+ }
|
|
|
+ final dynamic description = json['description'];
|
|
|
+ if (description != null) {
|
|
|
+ ukLabourReviewStatusRow.description = description;
|
|
|
+ }
|
|
|
+ final dynamic attUrl = json['att_url'];
|
|
|
+ if (attUrl != null) {
|
|
|
+ ukLabourReviewStatusRow.attUrl = attUrl;
|
|
|
+ }
|
|
|
+ final int? templateId = jsonConvert.convert<int>(json['template_id']);
|
|
|
+ if (templateId != null) {
|
|
|
+ ukLabourReviewStatusRow.templateId = templateId;
|
|
|
+ }
|
|
|
+ final int? jobTitleId = jsonConvert.convert<int>(json['job_title_id']);
|
|
|
+ if (jobTitleId != null) {
|
|
|
+ ukLabourReviewStatusRow.jobTitleId = jobTitleId;
|
|
|
+ }
|
|
|
+ return ukLabourReviewStatusRow;
|
|
|
+}
|
|
|
+
|
|
|
+Map<String, dynamic> $UkLabourReviewStatusRowToJson(
|
|
|
+ UkLabourReviewStatusRow entity) {
|
|
|
+ final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
+ data['id'] = entity.id;
|
|
|
+ data['employer_admin_id'] = entity.employerAdminId;
|
|
|
+ data['job_title'] = entity.jobTitle;
|
|
|
+ data['need_num'] = entity.needNum;
|
|
|
+ data['job_start'] = entity.jobStart;
|
|
|
+ data['job_end'] = entity.jobEnd;
|
|
|
+ data['job_id'] = entity.jobId;
|
|
|
+ data['remark_id'] = entity.remarkId;
|
|
|
+ data['status'] = entity.status;
|
|
|
+ data['add_time'] = entity.addTime;
|
|
|
+ data['from'] = entity.from;
|
|
|
+ data['reject_reason'] = entity.rejectReason;
|
|
|
+ data['banquet'] = entity.banquet;
|
|
|
+ data['hotel_job_id'] = entity.hotelJobId;
|
|
|
+ data['work_content'] = entity.workContent;
|
|
|
+ data['hourly_rate'] = entity.hourlyRate;
|
|
|
+ data['co_department_id'] = entity.coDepartmentId;
|
|
|
+ data['co_status'] = entity.coStatus;
|
|
|
+ data['co_template_id'] = entity.coTemplateId;
|
|
|
+ data['co_approved_at'] = entity.coApprovedAt;
|
|
|
+ data['service_type'] = entity.serviceType;
|
|
|
+ data['job_unit'] = entity.jobUnit;
|
|
|
+ data['agency_rate'] = entity.agencyRate;
|
|
|
+ data['location'] = entity.location;
|
|
|
+ data['vehicle'] = entity.vehicle;
|
|
|
+ data['source_type'] = entity.sourceType;
|
|
|
+ data['agency_id'] = entity.agencyId;
|
|
|
+ data['agency_name'] = entity.agencyName;
|
|
|
+ data['employment_type'] = entity.employmentType;
|
|
|
+ data['event_name'] = entity.eventName;
|
|
|
+ data['event_type'] = entity.eventType;
|
|
|
+ data['passengers'] = entity.passengers;
|
|
|
+ data['est_revenue'] = entity.estRevenue;
|
|
|
+ data['position'] = entity.position;
|
|
|
+ data['est_cost'] = entity.estCost;
|
|
|
+ data['description'] = entity.description;
|
|
|
+ data['att_url'] = entity.attUrl;
|
|
|
+ data['template_id'] = entity.templateId;
|
|
|
+ data['job_title_id'] = entity.jobTitleId;
|
|
|
+ return data;
|
|
|
+}
|
|
|
+
|
|
|
+extension UkLabourReviewStatusRowExtension on UkLabourReviewStatusRow {
|
|
|
+ UkLabourReviewStatusRow copyWith({
|
|
|
+ int? id,
|
|
|
+ int? employerAdminId,
|
|
|
+ String? jobTitle,
|
|
|
+ int? needNum,
|
|
|
+ String? jobStart,
|
|
|
+ String? jobEnd,
|
|
|
+ int? jobId,
|
|
|
+ int? remarkId,
|
|
|
+ String? status,
|
|
|
+ String? addTime,
|
|
|
+ String? from,
|
|
|
+ dynamic rejectReason,
|
|
|
+ dynamic banquet,
|
|
|
+ int? hotelJobId,
|
|
|
+ String? workContent,
|
|
|
+ double? hourlyRate,
|
|
|
+ int? coDepartmentId,
|
|
|
+ int? coStatus,
|
|
|
+ int? coTemplateId,
|
|
|
+ dynamic coApprovedAt,
|
|
|
+ int? serviceType,
|
|
|
+ String? jobUnit,
|
|
|
+ String? agencyRate,
|
|
|
+ String? location,
|
|
|
+ String? vehicle,
|
|
|
+ int? sourceType,
|
|
|
+ int? agencyId,
|
|
|
+ String? agencyName,
|
|
|
+ dynamic employmentType,
|
|
|
+ dynamic eventName,
|
|
|
+ dynamic eventType,
|
|
|
+ int? passengers,
|
|
|
+ dynamic estRevenue,
|
|
|
+ dynamic position,
|
|
|
+ dynamic estCost,
|
|
|
+ dynamic description,
|
|
|
+ dynamic attUrl,
|
|
|
+ int? templateId,
|
|
|
+ int? jobTitleId,
|
|
|
+ }) {
|
|
|
+ return UkLabourReviewStatusRow()
|
|
|
+ ..id = id ?? this.id
|
|
|
+ ..employerAdminId = employerAdminId ?? this.employerAdminId
|
|
|
+ ..jobTitle = jobTitle ?? this.jobTitle
|
|
|
+ ..needNum = needNum ?? this.needNum
|
|
|
+ ..jobStart = jobStart ?? this.jobStart
|
|
|
+ ..jobEnd = jobEnd ?? this.jobEnd
|
|
|
+ ..jobId = jobId ?? this.jobId
|
|
|
+ ..remarkId = remarkId ?? this.remarkId
|
|
|
+ ..status = status ?? this.status
|
|
|
+ ..addTime = addTime ?? this.addTime
|
|
|
+ ..from = from ?? this.from
|
|
|
+ ..rejectReason = rejectReason ?? this.rejectReason
|
|
|
+ ..banquet = banquet ?? this.banquet
|
|
|
+ ..hotelJobId = hotelJobId ?? this.hotelJobId
|
|
|
+ ..workContent = workContent ?? this.workContent
|
|
|
+ ..hourlyRate = hourlyRate ?? this.hourlyRate
|
|
|
+ ..coDepartmentId = coDepartmentId ?? this.coDepartmentId
|
|
|
+ ..coStatus = coStatus ?? this.coStatus
|
|
|
+ ..coTemplateId = coTemplateId ?? this.coTemplateId
|
|
|
+ ..coApprovedAt = coApprovedAt ?? this.coApprovedAt
|
|
|
+ ..serviceType = serviceType ?? this.serviceType
|
|
|
+ ..jobUnit = jobUnit ?? this.jobUnit
|
|
|
+ ..agencyRate = agencyRate ?? this.agencyRate
|
|
|
+ ..location = location ?? this.location
|
|
|
+ ..vehicle = vehicle ?? this.vehicle
|
|
|
+ ..sourceType = sourceType ?? this.sourceType
|
|
|
+ ..agencyId = agencyId ?? this.agencyId
|
|
|
+ ..agencyName = agencyName ?? this.agencyName
|
|
|
+ ..employmentType = employmentType ?? this.employmentType
|
|
|
+ ..eventName = eventName ?? this.eventName
|
|
|
+ ..eventType = eventType ?? this.eventType
|
|
|
+ ..passengers = passengers ?? this.passengers
|
|
|
+ ..estRevenue = estRevenue ?? this.estRevenue
|
|
|
+ ..position = position ?? this.position
|
|
|
+ ..estCost = estCost ?? this.estCost
|
|
|
+ ..description = description ?? this.description
|
|
|
+ ..attUrl = attUrl ?? this.attUrl
|
|
|
+ ..templateId = templateId ?? this.templateId
|
|
|
+ ..jobTitleId = jobTitleId ?? this.jobTitleId;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+UkLabourReviewStatusRecords $UkLabourReviewStatusRecordsFromJson(
|
|
|
+ Map<String, dynamic> json) {
|
|
|
+ final UkLabourReviewStatusRecords ukLabourReviewStatusRecords = UkLabourReviewStatusRecords();
|
|
|
+ final int? serialNumber = jsonConvert.convert<int>(json['serial_number']);
|
|
|
+ if (serialNumber != null) {
|
|
|
+ ukLabourReviewStatusRecords.serialNumber = serialNumber;
|
|
|
+ }
|
|
|
+ final String? nodeName = jsonConvert.convert<String>(json['node_name']);
|
|
|
+ if (nodeName != null) {
|
|
|
+ ukLabourReviewStatusRecords.nodeName = nodeName;
|
|
|
+ }
|
|
|
+ final String? statusShow = jsonConvert.convert<String>(json['status_show']);
|
|
|
+ if (statusShow != null) {
|
|
|
+ ukLabourReviewStatusRecords.statusShow = statusShow;
|
|
|
+ }
|
|
|
+ final String? auditName = jsonConvert.convert<String>(json['audit_name']);
|
|
|
+ if (auditName != null) {
|
|
|
+ ukLabourReviewStatusRecords.auditName = auditName;
|
|
|
+ }
|
|
|
+ final String? auditTime = jsonConvert.convert<String>(json['audit_time']);
|
|
|
+ if (auditTime != null) {
|
|
|
+ ukLabourReviewStatusRecords.auditTime = auditTime;
|
|
|
+ }
|
|
|
+ final dynamic auditMark = json['audit_mark'];
|
|
|
+ if (auditMark != null) {
|
|
|
+ ukLabourReviewStatusRecords.auditMark = auditMark;
|
|
|
+ }
|
|
|
+ final String? createdAt = jsonConvert.convert<String>(json['created_at']);
|
|
|
+ if (createdAt != null) {
|
|
|
+ ukLabourReviewStatusRecords.createdAt = createdAt;
|
|
|
+ }
|
|
|
+ final String? assigneeTypeShow = jsonConvert.convert<String>(
|
|
|
+ json['assignee_type_show']);
|
|
|
+ if (assigneeTypeShow != null) {
|
|
|
+ ukLabourReviewStatusRecords.assigneeTypeShow = assigneeTypeShow;
|
|
|
+ }
|
|
|
+ final String? designationShow = jsonConvert.convert<String>(
|
|
|
+ json['designation_show']);
|
|
|
+ if (designationShow != null) {
|
|
|
+ ukLabourReviewStatusRecords.designationShow = designationShow;
|
|
|
+ }
|
|
|
+ return ukLabourReviewStatusRecords;
|
|
|
+}
|
|
|
+
|
|
|
+Map<String, dynamic> $UkLabourReviewStatusRecordsToJson(
|
|
|
+ UkLabourReviewStatusRecords entity) {
|
|
|
+ final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
+ 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 UkLabourReviewStatusRecordsExtension on UkLabourReviewStatusRecords {
|
|
|
+ UkLabourReviewStatusRecords copyWith({
|
|
|
+ int? serialNumber,
|
|
|
+ String? nodeName,
|
|
|
+ String? statusShow,
|
|
|
+ String? auditName,
|
|
|
+ String? auditTime,
|
|
|
+ dynamic auditMark,
|
|
|
+ String? createdAt,
|
|
|
+ String? assigneeTypeShow,
|
|
|
+ String? designationShow,
|
|
|
+ }) {
|
|
|
+ return UkLabourReviewStatusRecords()
|
|
|
+ ..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;
|
|
|
+ }
|
|
|
+}
|