|
@@ -0,0 +1,388 @@
|
|
|
+import 'package:domain/generated/json/base/json_convert_content.dart';
|
|
|
+import 'package:domain/entity/response/labour_request_s_g_edit_index_entity.dart';
|
|
|
+
|
|
|
+LabourRequestSGEditIndexEntity $LabourRequestSGEditIndexEntityFromJson(Map<String, dynamic> json) {
|
|
|
+ final LabourRequestSGEditIndexEntity labourRequestSGEditIndexEntity = LabourRequestSGEditIndexEntity();
|
|
|
+ final LabourRequestSGEditIndexJob? job = jsonConvert.convert<LabourRequestSGEditIndexJob>(json['job']);
|
|
|
+ if (job != null) {
|
|
|
+ labourRequestSGEditIndexEntity.job = job;
|
|
|
+ }
|
|
|
+ final String? requestId = jsonConvert.convert<String>(json['request_id']);
|
|
|
+ if (requestId != null) {
|
|
|
+ labourRequestSGEditIndexEntity.requestId = requestId;
|
|
|
+ }
|
|
|
+ final String? jobTitle = jsonConvert.convert<String>(json['job_title']);
|
|
|
+ if (jobTitle != null) {
|
|
|
+ labourRequestSGEditIndexEntity.jobTitle = jobTitle;
|
|
|
+ }
|
|
|
+ final int? outletId = jsonConvert.convert<int>(json['outlet_id']);
|
|
|
+ if (outletId != null) {
|
|
|
+ labourRequestSGEditIndexEntity.outletId = outletId;
|
|
|
+ }
|
|
|
+ final int? reqType = jsonConvert.convert<int>(json['req_type']);
|
|
|
+ if (reqType != null) {
|
|
|
+ labourRequestSGEditIndexEntity.reqType = reqType;
|
|
|
+ }
|
|
|
+ final String? startTime = jsonConvert.convert<String>(json['start_time']);
|
|
|
+ if (startTime != null) {
|
|
|
+ labourRequestSGEditIndexEntity.startTime = startTime;
|
|
|
+ }
|
|
|
+ final String? remark = jsonConvert.convert<String>(json['remark']);
|
|
|
+ if (remark != null) {
|
|
|
+ labourRequestSGEditIndexEntity.remark = remark;
|
|
|
+ }
|
|
|
+ final String? endTime = jsonConvert.convert<String>(json['end_time']);
|
|
|
+ if (endTime != null) {
|
|
|
+ labourRequestSGEditIndexEntity.endTime = endTime;
|
|
|
+ }
|
|
|
+ final List<LabourRequestSGEditIndexJob>? outletList = (json['outlet_list'] as List<dynamic>?)?.map(
|
|
|
+ (e) => jsonConvert.convert<LabourRequestSGEditIndexJob>(e) as LabourRequestSGEditIndexJob).toList();
|
|
|
+ if (outletList != null) {
|
|
|
+ labourRequestSGEditIndexEntity.outletList = outletList;
|
|
|
+ }
|
|
|
+ final List<LabourRequestSGEditIndexChecked>? requestType = (json['request_type'] as List<dynamic>?)?.map(
|
|
|
+ (e) => jsonConvert.convert<LabourRequestSGEditIndexChecked>(e) as LabourRequestSGEditIndexChecked).toList();
|
|
|
+ if (requestType != null) {
|
|
|
+ labourRequestSGEditIndexEntity.requestType = requestType;
|
|
|
+ }
|
|
|
+ final List<LabourRequestSGEditIndexJob>? limitList = (json['limit_list'] as List<dynamic>?)?.map(
|
|
|
+ (e) => jsonConvert.convert<LabourRequestSGEditIndexJob>(e) as LabourRequestSGEditIndexJob).toList();
|
|
|
+ if (limitList != null) {
|
|
|
+ labourRequestSGEditIndexEntity.limitList = limitList;
|
|
|
+ }
|
|
|
+ final bool? lookRemark = jsonConvert.convert<bool>(json['look_remark']);
|
|
|
+ if (lookRemark != null) {
|
|
|
+ labourRequestSGEditIndexEntity.lookRemark = lookRemark;
|
|
|
+ }
|
|
|
+ return labourRequestSGEditIndexEntity;
|
|
|
+}
|
|
|
+
|
|
|
+Map<String, dynamic> $LabourRequestSGEditIndexEntityToJson(LabourRequestSGEditIndexEntity entity) {
|
|
|
+ final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
+ data['job'] = entity.job?.toJson();
|
|
|
+ data['request_id'] = entity.requestId;
|
|
|
+ data['job_title'] = entity.jobTitle;
|
|
|
+ data['outlet_id'] = entity.outletId;
|
|
|
+ data['req_type'] = entity.reqType;
|
|
|
+ data['start_time'] = entity.startTime;
|
|
|
+ data['remark'] = entity.remark;
|
|
|
+ data['end_time'] = entity.endTime;
|
|
|
+ data['outlet_list'] = entity.outletList.map((v) => v.toJson()).toList();
|
|
|
+ data['request_type'] = entity.requestType.map((v) => v.toJson()).toList();
|
|
|
+ data['limit_list'] = entity.limitList.map((v) => v.toJson()).toList();
|
|
|
+ data['look_remark'] = entity.lookRemark;
|
|
|
+ return data;
|
|
|
+}
|
|
|
+
|
|
|
+extension LabourRequestSGEditIndexEntityExtension on LabourRequestSGEditIndexEntity {
|
|
|
+ LabourRequestSGEditIndexEntity copyWith({
|
|
|
+ LabourRequestSGEditIndexJob? job,
|
|
|
+ String? requestId,
|
|
|
+ String? jobTitle,
|
|
|
+ int? outletId,
|
|
|
+ int? reqType,
|
|
|
+ String? startTime,
|
|
|
+ String? remark,
|
|
|
+ String? endTime,
|
|
|
+ List<LabourRequestSGEditIndexJob>? outletList,
|
|
|
+ List<LabourRequestSGEditIndexChecked>? requestType,
|
|
|
+ List<LabourRequestSGEditIndexJob>? limitList,
|
|
|
+ bool? lookRemark,
|
|
|
+ }) {
|
|
|
+ return LabourRequestSGEditIndexEntity()
|
|
|
+ ..job = job ?? this.job
|
|
|
+ ..requestId = requestId ?? this.requestId
|
|
|
+ ..jobTitle = jobTitle ?? this.jobTitle
|
|
|
+ ..outletId = outletId ?? this.outletId
|
|
|
+ ..reqType = reqType ?? this.reqType
|
|
|
+ ..startTime = startTime ?? this.startTime
|
|
|
+ ..remark = remark ?? this.remark
|
|
|
+ ..endTime = endTime ?? this.endTime
|
|
|
+ ..outletList = outletList ?? this.outletList
|
|
|
+ ..requestType = requestType ?? this.requestType
|
|
|
+ ..limitList = limitList ?? this.limitList
|
|
|
+ ..lookRemark = lookRemark ?? this.lookRemark;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+LabourRequestSGEditIndexJob $LabourRequestSGEditIndexJobFromJson(Map<String, dynamic> json) {
|
|
|
+ final LabourRequestSGEditIndexJob labourRequestSGEditIndexJob = LabourRequestSGEditIndexJob();
|
|
|
+ final String? id = jsonConvert.convert<String>(json['id']);
|
|
|
+ if (id != null) {
|
|
|
+ labourRequestSGEditIndexJob.id = id;
|
|
|
+ }
|
|
|
+ final String? employerAdminId = jsonConvert.convert<String>(json['employer_admin_id']);
|
|
|
+ if (employerAdminId != null) {
|
|
|
+ labourRequestSGEditIndexJob.employerAdminId = employerAdminId;
|
|
|
+ }
|
|
|
+ final String? jobTitle = jsonConvert.convert<String>(json['job_title']);
|
|
|
+ if (jobTitle != null) {
|
|
|
+ labourRequestSGEditIndexJob.jobTitle = jobTitle;
|
|
|
+ }
|
|
|
+ final int? needNum = jsonConvert.convert<int>(json['need_num']);
|
|
|
+ if (needNum != null) {
|
|
|
+ labourRequestSGEditIndexJob.needNum = needNum;
|
|
|
+ }
|
|
|
+ final int? genderNumberLimit = jsonConvert.convert<int>(json['gender_number_limit']);
|
|
|
+ if (genderNumberLimit != null) {
|
|
|
+ labourRequestSGEditIndexJob.genderNumberLimit = genderNumberLimit;
|
|
|
+ }
|
|
|
+ final int? maleNumberLimit = jsonConvert.convert<int>(json['male_number_limit']);
|
|
|
+ if (maleNumberLimit != null) {
|
|
|
+ labourRequestSGEditIndexJob.maleNumberLimit = maleNumberLimit;
|
|
|
+ }
|
|
|
+ final int? femaleNumberLimit = jsonConvert.convert<int>(json['female_number_limit']);
|
|
|
+ if (femaleNumberLimit != null) {
|
|
|
+ labourRequestSGEditIndexJob.femaleNumberLimit = femaleNumberLimit;
|
|
|
+ }
|
|
|
+ final String? jobStart = jsonConvert.convert<String>(json['job_start']);
|
|
|
+ if (jobStart != null) {
|
|
|
+ labourRequestSGEditIndexJob.jobStart = jobStart;
|
|
|
+ }
|
|
|
+ final String? jobEnd = jsonConvert.convert<String>(json['job_end']);
|
|
|
+ if (jobEnd != null) {
|
|
|
+ labourRequestSGEditIndexJob.jobEnd = jobEnd;
|
|
|
+ }
|
|
|
+ final int? jobId = jsonConvert.convert<int>(json['job_id']);
|
|
|
+ if (jobId != null) {
|
|
|
+ labourRequestSGEditIndexJob.jobId = jobId;
|
|
|
+ }
|
|
|
+ final int? remarkId = jsonConvert.convert<int>(json['remark_id']);
|
|
|
+ if (remarkId != null) {
|
|
|
+ labourRequestSGEditIndexJob.remarkId = remarkId;
|
|
|
+ }
|
|
|
+ final String? status = jsonConvert.convert<String>(json['status']);
|
|
|
+ if (status != null) {
|
|
|
+ labourRequestSGEditIndexJob.status = status;
|
|
|
+ }
|
|
|
+ final String? addTime = jsonConvert.convert<String>(json['add_time']);
|
|
|
+ if (addTime != null) {
|
|
|
+ labourRequestSGEditIndexJob.addTime = addTime;
|
|
|
+ }
|
|
|
+ final String? from = jsonConvert.convert<String>(json['from']);
|
|
|
+ if (from != null) {
|
|
|
+ labourRequestSGEditIndexJob.from = from;
|
|
|
+ }
|
|
|
+ final dynamic rejectReason = json['reject_reason'];
|
|
|
+ if (rejectReason != null) {
|
|
|
+ labourRequestSGEditIndexJob.rejectReason = rejectReason;
|
|
|
+ }
|
|
|
+ final dynamic banquet = json['banquet'];
|
|
|
+ if (banquet != null) {
|
|
|
+ labourRequestSGEditIndexJob.banquet = banquet;
|
|
|
+ }
|
|
|
+ final int? hotelJobId = jsonConvert.convert<int>(json['hotel_job_id']);
|
|
|
+ if (hotelJobId != null) {
|
|
|
+ labourRequestSGEditIndexJob.hotelJobId = hotelJobId;
|
|
|
+ }
|
|
|
+ final String? workContent = jsonConvert.convert<String>(json['work_content']);
|
|
|
+ if (workContent != null) {
|
|
|
+ labourRequestSGEditIndexJob.workContent = workContent;
|
|
|
+ }
|
|
|
+ final int? crmContractPositionId = jsonConvert.convert<int>(json['crm_contract_position_id']);
|
|
|
+ if (crmContractPositionId != null) {
|
|
|
+ labourRequestSGEditIndexJob.crmContractPositionId = crmContractPositionId;
|
|
|
+ }
|
|
|
+ final int? rateType = jsonConvert.convert<int>(json['rate_type']);
|
|
|
+ if (rateType != null) {
|
|
|
+ labourRequestSGEditIndexJob.rateType = rateType;
|
|
|
+ }
|
|
|
+ final int? isSend = jsonConvert.convert<int>(json['is_send']);
|
|
|
+ if (isSend != null) {
|
|
|
+ labourRequestSGEditIndexJob.isSend = isSend;
|
|
|
+ }
|
|
|
+ final int? requestType = jsonConvert.convert<int>(json['request_type']);
|
|
|
+ if (requestType != null) {
|
|
|
+ labourRequestSGEditIndexJob.requestType = requestType;
|
|
|
+ }
|
|
|
+ final int? outletId = jsonConvert.convert<int>(json['outlet_id']);
|
|
|
+ if (outletId != null) {
|
|
|
+ labourRequestSGEditIndexJob.outletId = outletId;
|
|
|
+ }
|
|
|
+ final String? outletName = jsonConvert.convert<String>(json['outlet_name']);
|
|
|
+ if (outletName != null) {
|
|
|
+ labourRequestSGEditIndexJob.outletName = outletName;
|
|
|
+ }
|
|
|
+ final int? jobTitleId = jsonConvert.convert<int>(json['job_title_id']);
|
|
|
+ if (jobTitleId != null) {
|
|
|
+ labourRequestSGEditIndexJob.jobTitleId = jobTitleId;
|
|
|
+ }
|
|
|
+ final String? agencyRate = jsonConvert.convert<String>(json['agency_rate']);
|
|
|
+ if (agencyRate != null) {
|
|
|
+ labourRequestSGEditIndexJob.agencyRate = agencyRate;
|
|
|
+ }
|
|
|
+ final dynamic hotelRemark = json['hotel_remark'];
|
|
|
+ if (hotelRemark != null) {
|
|
|
+ labourRequestSGEditIndexJob.hotelRemark = hotelRemark;
|
|
|
+ }
|
|
|
+ return labourRequestSGEditIndexJob;
|
|
|
+}
|
|
|
+
|
|
|
+Map<String, dynamic> $LabourRequestSGEditIndexJobToJson(LabourRequestSGEditIndexJob 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['gender_number_limit'] = entity.genderNumberLimit;
|
|
|
+ data['male_number_limit'] = entity.maleNumberLimit;
|
|
|
+ data['female_number_limit'] = entity.femaleNumberLimit;
|
|
|
+ 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['crm_contract_position_id'] = entity.crmContractPositionId;
|
|
|
+ data['rate_type'] = entity.rateType;
|
|
|
+ data['is_send'] = entity.isSend;
|
|
|
+ data['request_type'] = entity.requestType;
|
|
|
+ data['outlet_id'] = entity.outletId;
|
|
|
+ data['outlet_name'] = entity.outletName;
|
|
|
+ data['job_title_id'] = entity.jobTitleId;
|
|
|
+ data['agency_rate'] = entity.agencyRate;
|
|
|
+ data['hotel_remark'] = entity.hotelRemark;
|
|
|
+ return data;
|
|
|
+}
|
|
|
+
|
|
|
+extension LabourRequestSGEditIndexJobExtension on LabourRequestSGEditIndexJob {
|
|
|
+ LabourRequestSGEditIndexJob copyWith({
|
|
|
+ String? id,
|
|
|
+ String? employerAdminId,
|
|
|
+ String? jobTitle,
|
|
|
+ int? needNum,
|
|
|
+ int? genderNumberLimit,
|
|
|
+ int? maleNumberLimit,
|
|
|
+ int? femaleNumberLimit,
|
|
|
+ String? jobStart,
|
|
|
+ String? jobEnd,
|
|
|
+ int? jobId,
|
|
|
+ int? remarkId,
|
|
|
+ String? status,
|
|
|
+ String? addTime,
|
|
|
+ String? from,
|
|
|
+ dynamic rejectReason,
|
|
|
+ dynamic banquet,
|
|
|
+ int? hotelJobId,
|
|
|
+ String? workContent,
|
|
|
+ int? crmContractPositionId,
|
|
|
+ int? rateType,
|
|
|
+ int? isSend,
|
|
|
+ int? requestType,
|
|
|
+ int? outletId,
|
|
|
+ String? outletName,
|
|
|
+ int? jobTitleId,
|
|
|
+ String? agencyRate,
|
|
|
+ dynamic hotelRemark,
|
|
|
+ }) {
|
|
|
+ return LabourRequestSGEditIndexJob()
|
|
|
+ ..id = id ?? this.id
|
|
|
+ ..employerAdminId = employerAdminId ?? this.employerAdminId
|
|
|
+ ..jobTitle = jobTitle ?? this.jobTitle
|
|
|
+ ..needNum = needNum ?? this.needNum
|
|
|
+ ..genderNumberLimit = genderNumberLimit ?? this.genderNumberLimit
|
|
|
+ ..maleNumberLimit = maleNumberLimit ?? this.maleNumberLimit
|
|
|
+ ..femaleNumberLimit = femaleNumberLimit ?? this.femaleNumberLimit
|
|
|
+ ..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
|
|
|
+ ..crmContractPositionId = crmContractPositionId ?? this.crmContractPositionId
|
|
|
+ ..rateType = rateType ?? this.rateType
|
|
|
+ ..isSend = isSend ?? this.isSend
|
|
|
+ ..requestType = requestType ?? this.requestType
|
|
|
+ ..outletId = outletId ?? this.outletId
|
|
|
+ ..outletName = outletName ?? this.outletName
|
|
|
+ ..jobTitleId = jobTitleId ?? this.jobTitleId
|
|
|
+ ..agencyRate = agencyRate ?? this.agencyRate
|
|
|
+ ..hotelRemark = hotelRemark ?? this.hotelRemark;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+LabourRequestSGEditSelected $LabourRequestSGEditSelectedFromJson(Map<String, dynamic> json) {
|
|
|
+ final LabourRequestSGEditSelected labourRequestSGEditSelected = LabourRequestSGEditSelected();
|
|
|
+ final String? value = jsonConvert.convert<String>(json['value']);
|
|
|
+ if (value != null) {
|
|
|
+ labourRequestSGEditSelected.value = value;
|
|
|
+ }
|
|
|
+ final String? txt = jsonConvert.convert<String>(json['txt']);
|
|
|
+ if (txt != null) {
|
|
|
+ labourRequestSGEditSelected.txt = txt;
|
|
|
+ }
|
|
|
+ final String? selected = jsonConvert.convert<String>(json['selected']);
|
|
|
+ if (selected != null) {
|
|
|
+ labourRequestSGEditSelected.selected = selected;
|
|
|
+ }
|
|
|
+ return labourRequestSGEditSelected;
|
|
|
+}
|
|
|
+
|
|
|
+Map<String, dynamic> $LabourRequestSGEditSelectedToJson(LabourRequestSGEditSelected entity) {
|
|
|
+ final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
+ data['value'] = entity.value;
|
|
|
+ data['txt'] = entity.txt;
|
|
|
+ data['selected'] = entity.selected;
|
|
|
+ return data;
|
|
|
+}
|
|
|
+
|
|
|
+extension LabourRequestSGEditSelectedExtension on LabourRequestSGEditSelected {
|
|
|
+ LabourRequestSGEditSelected copyWith({
|
|
|
+ String? value,
|
|
|
+ String? txt,
|
|
|
+ String? selected,
|
|
|
+ }) {
|
|
|
+ return LabourRequestSGEditSelected()
|
|
|
+ ..value = value ?? this.value
|
|
|
+ ..txt = txt ?? this.txt
|
|
|
+ ..selected = selected ?? this.selected;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+LabourRequestSGEditIndexChecked $LabourRequestSGEditIndexCheckedFromJson(Map<String, dynamic> json) {
|
|
|
+ final LabourRequestSGEditIndexChecked labourRequestSGEditIndexChecked = LabourRequestSGEditIndexChecked();
|
|
|
+ final String? value = jsonConvert.convert<String>(json['value']);
|
|
|
+ if (value != null) {
|
|
|
+ labourRequestSGEditIndexChecked.value = value;
|
|
|
+ }
|
|
|
+ final String? txt = jsonConvert.convert<String>(json['txt']);
|
|
|
+ if (txt != null) {
|
|
|
+ labourRequestSGEditIndexChecked.txt = txt;
|
|
|
+ }
|
|
|
+ final String? checked = jsonConvert.convert<String>(json['checked']);
|
|
|
+ if (checked != null) {
|
|
|
+ labourRequestSGEditIndexChecked.checked = checked;
|
|
|
+ }
|
|
|
+ return labourRequestSGEditIndexChecked;
|
|
|
+}
|
|
|
+
|
|
|
+Map<String, dynamic> $LabourRequestSGEditIndexCheckedToJson(LabourRequestSGEditIndexChecked entity) {
|
|
|
+ final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
+ data['value'] = entity.value;
|
|
|
+ data['txt'] = entity.txt;
|
|
|
+ data['checked'] = entity.checked;
|
|
|
+ return data;
|
|
|
+}
|
|
|
+
|
|
|
+extension LabourRequestSGEditIndexCheckedExtension on LabourRequestSGEditIndexChecked {
|
|
|
+ LabourRequestSGEditIndexChecked copyWith({
|
|
|
+ String? value,
|
|
|
+ String? txt,
|
|
|
+ String? checked,
|
|
|
+ }) {
|
|
|
+ return LabourRequestSGEditIndexChecked()
|
|
|
+ ..value = value ?? this.value
|
|
|
+ ..txt = txt ?? this.txt
|
|
|
+ ..checked = checked ?? this.checked;
|
|
|
+ }
|
|
|
+}
|