|
@@ -0,0 +1,346 @@
|
|
|
+import 'package:domain/generated/json/base/json_convert_content.dart';
|
|
|
+import 'package:domain/entity/response/job_applied_list_s_g_entity.dart';
|
|
|
+
|
|
|
+JobAppliedListSGEntity $JobAppliedListSGEntityFromJson(Map<String, dynamic> json) {
|
|
|
+ final JobAppliedListSGEntity jobAppliedListSGEntity = JobAppliedListSGEntity();
|
|
|
+ final int? total = jsonConvert.convert<int>(json['total']);
|
|
|
+ if (total != null) {
|
|
|
+ jobAppliedListSGEntity.total = total;
|
|
|
+ }
|
|
|
+ final List<JobAppliedListSGRows>? rows = (json['rows'] as List<dynamic>?)?.map(
|
|
|
+ (e) => jsonConvert.convert<JobAppliedListSGRows>(e) as JobAppliedListSGRows).toList();
|
|
|
+ if (rows != null) {
|
|
|
+ jobAppliedListSGEntity.rows = rows;
|
|
|
+ }
|
|
|
+ return jobAppliedListSGEntity;
|
|
|
+}
|
|
|
+
|
|
|
+Map<String, dynamic> $JobAppliedListSGEntityToJson(JobAppliedListSGEntity entity) {
|
|
|
+ final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
+ data['total'] = entity.total;
|
|
|
+ data['rows'] = entity.rows.map((v) => v.toJson()).toList();
|
|
|
+ return data;
|
|
|
+}
|
|
|
+
|
|
|
+extension JobAppliedListSGEntityExtension on JobAppliedListSGEntity {
|
|
|
+ JobAppliedListSGEntity copyWith({
|
|
|
+ int? total,
|
|
|
+ List<JobAppliedListSGRows>? rows,
|
|
|
+ }) {
|
|
|
+ return JobAppliedListSGEntity()
|
|
|
+ ..total = total ?? this.total
|
|
|
+ ..rows = rows ?? this.rows;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+JobAppliedListSGRows $JobAppliedListSGRowsFromJson(Map<String, dynamic> json) {
|
|
|
+ final JobAppliedListSGRows jobAppliedListSGRows = JobAppliedListSGRows();
|
|
|
+ final String? appliedId = jsonConvert.convert<String>(json['applied_id']);
|
|
|
+ if (appliedId != null) {
|
|
|
+ jobAppliedListSGRows.appliedId = appliedId;
|
|
|
+ }
|
|
|
+ final String? memberId = jsonConvert.convert<String>(json['member_id']);
|
|
|
+ if (memberId != null) {
|
|
|
+ jobAppliedListSGRows.memberId = memberId;
|
|
|
+ }
|
|
|
+ final String? jobTitle = jsonConvert.convert<String>(json['job_title']);
|
|
|
+ if (jobTitle != null) {
|
|
|
+ jobAppliedListSGRows.jobTitle = jobTitle;
|
|
|
+ }
|
|
|
+ final String? outletName = jsonConvert.convert<String>(json['outlet_name']);
|
|
|
+ if (outletName != null) {
|
|
|
+ jobAppliedListSGRows.outletName = outletName;
|
|
|
+ }
|
|
|
+ final String? labourerName = jsonConvert.convert<String>(json['labourer_name']);
|
|
|
+ if (labourerName != null) {
|
|
|
+ jobAppliedListSGRows.labourerName = labourerName;
|
|
|
+ }
|
|
|
+ final String? labourerNric = jsonConvert.convert<String>(json['labourer_nric']);
|
|
|
+ if (labourerNric != null) {
|
|
|
+ jobAppliedListSGRows.labourerNric = labourerNric;
|
|
|
+ }
|
|
|
+ final String? gender = jsonConvert.convert<String>(json['gender']);
|
|
|
+ if (gender != null) {
|
|
|
+ jobAppliedListSGRows.gender = gender;
|
|
|
+ }
|
|
|
+ final String? jobDate = jsonConvert.convert<String>(json['job_date']);
|
|
|
+ if (jobDate != null) {
|
|
|
+ jobAppliedListSGRows.jobDate = jobDate;
|
|
|
+ }
|
|
|
+ final String? startTime = jsonConvert.convert<String>(json['start_time']);
|
|
|
+ if (startTime != null) {
|
|
|
+ jobAppliedListSGRows.startTime = startTime;
|
|
|
+ }
|
|
|
+ final String? endTime = jsonConvert.convert<String>(json['end_time']);
|
|
|
+ if (endTime != null) {
|
|
|
+ jobAppliedListSGRows.endTime = endTime;
|
|
|
+ }
|
|
|
+ final int? adjustHours = jsonConvert.convert<int>(json['adjust_hours']);
|
|
|
+ if (adjustHours != null) {
|
|
|
+ jobAppliedListSGRows.adjustHours = adjustHours;
|
|
|
+ }
|
|
|
+ final String? totalHours = jsonConvert.convert<String>(json['total_hours']);
|
|
|
+ if (totalHours != null) {
|
|
|
+ jobAppliedListSGRows.totalHours = totalHours;
|
|
|
+ }
|
|
|
+ final int? status = jsonConvert.convert<int>(json['status']);
|
|
|
+ if (status != null) {
|
|
|
+ jobAppliedListSGRows.status = status;
|
|
|
+ }
|
|
|
+ final String? statusShow = jsonConvert.convert<String>(json['status_show']);
|
|
|
+ if (statusShow != null) {
|
|
|
+ jobAppliedListSGRows.statusShow = statusShow;
|
|
|
+ }
|
|
|
+ final String? hourlyRate = jsonConvert.convert<String>(json['hourly_rate']);
|
|
|
+ if (hourlyRate != null) {
|
|
|
+ jobAppliedListSGRows.hourlyRate = hourlyRate;
|
|
|
+ }
|
|
|
+ final int? remarkStatus = jsonConvert.convert<int>(json['remark_status']);
|
|
|
+ if (remarkStatus != null) {
|
|
|
+ jobAppliedListSGRows.remarkStatus = remarkStatus;
|
|
|
+ }
|
|
|
+ final bool? isSelected = jsonConvert.convert<bool>(json['isSelected']);
|
|
|
+ if (isSelected != null) {
|
|
|
+ jobAppliedListSGRows.isSelected = isSelected;
|
|
|
+ }
|
|
|
+ final JobAppliedListSGRowsCheck? securityIn = jsonConvert.convert<JobAppliedListSGRowsCheck>(json['security_in']);
|
|
|
+ if (securityIn != null) {
|
|
|
+ jobAppliedListSGRows.securityIn = securityIn;
|
|
|
+ }
|
|
|
+ final JobAppliedListSGRowsCheck? securityOut = jsonConvert.convert<JobAppliedListSGRowsCheck>(json['security_out']);
|
|
|
+ if (securityOut != null) {
|
|
|
+ jobAppliedListSGRows.securityOut = securityOut;
|
|
|
+ }
|
|
|
+ final JobAppliedListSGRowsCheck? workIn = jsonConvert.convert<JobAppliedListSGRowsCheck>(json['work_in']);
|
|
|
+ if (workIn != null) {
|
|
|
+ jobAppliedListSGRows.workIn = workIn;
|
|
|
+ }
|
|
|
+ final JobAppliedListSGRowsCheck? workOut = jsonConvert.convert<JobAppliedListSGRowsCheck>(json['work_out']);
|
|
|
+ if (workOut != null) {
|
|
|
+ jobAppliedListSGRows.workOut = workOut;
|
|
|
+ }
|
|
|
+ final int? sIn = jsonConvert.convert<int>(json['s_in']);
|
|
|
+ if (sIn != null) {
|
|
|
+ jobAppliedListSGRows.sIn = sIn;
|
|
|
+ }
|
|
|
+ final int? sOut = jsonConvert.convert<int>(json['s_out']);
|
|
|
+ if (sOut != null) {
|
|
|
+ jobAppliedListSGRows.sOut = sOut;
|
|
|
+ }
|
|
|
+ final int? wIn = jsonConvert.convert<int>(json['w_in']);
|
|
|
+ if (wIn != null) {
|
|
|
+ jobAppliedListSGRows.wIn = wIn;
|
|
|
+ }
|
|
|
+ final int? wOut = jsonConvert.convert<int>(json['w_out']);
|
|
|
+ if (wOut != null) {
|
|
|
+ jobAppliedListSGRows.wOut = wOut;
|
|
|
+ }
|
|
|
+ final int? reviseHours = jsonConvert.convert<int>(json['revise_hours']);
|
|
|
+ if (reviseHours != null) {
|
|
|
+ jobAppliedListSGRows.reviseHours = reviseHours;
|
|
|
+ }
|
|
|
+ final int? showStar = jsonConvert.convert<int>(json['show_star']);
|
|
|
+ if (showStar != null) {
|
|
|
+ jobAppliedListSGRows.showStar = showStar;
|
|
|
+ }
|
|
|
+ final List<JobAppliedListSGRowsStatusList>? statusList = (json['status_list'] as List<dynamic>?)?.map(
|
|
|
+ (e) => jsonConvert.convert<JobAppliedListSGRowsStatusList>(e) as JobAppliedListSGRowsStatusList).toList();
|
|
|
+ if (statusList != null) {
|
|
|
+ jobAppliedListSGRows.statusList = statusList;
|
|
|
+ }
|
|
|
+ final List<String>? actionList = (json['action_list'] as List<dynamic>?)?.map(
|
|
|
+ (e) => jsonConvert.convert<String>(e) as String).toList();
|
|
|
+ if (actionList != null) {
|
|
|
+ jobAppliedListSGRows.actionList = actionList;
|
|
|
+ }
|
|
|
+ return jobAppliedListSGRows;
|
|
|
+}
|
|
|
+
|
|
|
+Map<String, dynamic> $JobAppliedListSGRowsToJson(JobAppliedListSGRows entity) {
|
|
|
+ final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
+ data['applied_id'] = entity.appliedId;
|
|
|
+ data['member_id'] = entity.memberId;
|
|
|
+ data['job_title'] = entity.jobTitle;
|
|
|
+ data['outlet_name'] = entity.outletName;
|
|
|
+ data['labourer_name'] = entity.labourerName;
|
|
|
+ data['labourer_nric'] = entity.labourerNric;
|
|
|
+ data['gender'] = entity.gender;
|
|
|
+ data['job_date'] = entity.jobDate;
|
|
|
+ data['start_time'] = entity.startTime;
|
|
|
+ data['end_time'] = entity.endTime;
|
|
|
+ data['adjust_hours'] = entity.adjustHours;
|
|
|
+ data['total_hours'] = entity.totalHours;
|
|
|
+ data['status'] = entity.status;
|
|
|
+ data['status_show'] = entity.statusShow;
|
|
|
+ data['hourly_rate'] = entity.hourlyRate;
|
|
|
+ data['remark_status'] = entity.remarkStatus;
|
|
|
+ data['isSelected'] = entity.isSelected;
|
|
|
+ data['security_in'] = entity.securityIn?.toJson();
|
|
|
+ data['security_out'] = entity.securityOut?.toJson();
|
|
|
+ data['work_in'] = entity.workIn?.toJson();
|
|
|
+ data['work_out'] = entity.workOut?.toJson();
|
|
|
+ data['s_in'] = entity.sIn;
|
|
|
+ data['s_out'] = entity.sOut;
|
|
|
+ data['w_in'] = entity.wIn;
|
|
|
+ data['w_out'] = entity.wOut;
|
|
|
+ data['revise_hours'] = entity.reviseHours;
|
|
|
+ data['show_star'] = entity.showStar;
|
|
|
+ data['status_list'] = entity.statusList.map((v) => v.toJson()).toList();
|
|
|
+ data['action_list'] = entity.actionList;
|
|
|
+ return data;
|
|
|
+}
|
|
|
+
|
|
|
+extension JobAppliedListSGRowsExtension on JobAppliedListSGRows {
|
|
|
+ JobAppliedListSGRows copyWith({
|
|
|
+ String? appliedId,
|
|
|
+ String? memberId,
|
|
|
+ String? jobTitle,
|
|
|
+ String? outletName,
|
|
|
+ String? labourerName,
|
|
|
+ String? labourerNric,
|
|
|
+ String? gender,
|
|
|
+ String? jobDate,
|
|
|
+ String? startTime,
|
|
|
+ String? endTime,
|
|
|
+ int? adjustHours,
|
|
|
+ String? totalHours,
|
|
|
+ int? status,
|
|
|
+ String? statusShow,
|
|
|
+ String? hourlyRate,
|
|
|
+ int? remarkStatus,
|
|
|
+ bool? isSelected,
|
|
|
+ JobAppliedListSGRowsCheck? securityIn,
|
|
|
+ JobAppliedListSGRowsCheck? securityOut,
|
|
|
+ JobAppliedListSGRowsCheck? workIn,
|
|
|
+ JobAppliedListSGRowsCheck? workOut,
|
|
|
+ int? sIn,
|
|
|
+ int? sOut,
|
|
|
+ int? wIn,
|
|
|
+ int? wOut,
|
|
|
+ int? reviseHours,
|
|
|
+ int? showStar,
|
|
|
+ List<JobAppliedListSGRowsStatusList>? statusList,
|
|
|
+ List<String>? actionList,
|
|
|
+ }) {
|
|
|
+ return JobAppliedListSGRows()
|
|
|
+ ..appliedId = appliedId ?? this.appliedId
|
|
|
+ ..memberId = memberId ?? this.memberId
|
|
|
+ ..jobTitle = jobTitle ?? this.jobTitle
|
|
|
+ ..outletName = outletName ?? this.outletName
|
|
|
+ ..labourerName = labourerName ?? this.labourerName
|
|
|
+ ..labourerNric = labourerNric ?? this.labourerNric
|
|
|
+ ..gender = gender ?? this.gender
|
|
|
+ ..jobDate = jobDate ?? this.jobDate
|
|
|
+ ..startTime = startTime ?? this.startTime
|
|
|
+ ..endTime = endTime ?? this.endTime
|
|
|
+ ..adjustHours = adjustHours ?? this.adjustHours
|
|
|
+ ..totalHours = totalHours ?? this.totalHours
|
|
|
+ ..status = status ?? this.status
|
|
|
+ ..statusShow = statusShow ?? this.statusShow
|
|
|
+ ..hourlyRate = hourlyRate ?? this.hourlyRate
|
|
|
+ ..remarkStatus = remarkStatus ?? this.remarkStatus
|
|
|
+ ..isSelected = isSelected ?? this.isSelected
|
|
|
+ ..securityIn = securityIn ?? this.securityIn
|
|
|
+ ..securityOut = securityOut ?? this.securityOut
|
|
|
+ ..workIn = workIn ?? this.workIn
|
|
|
+ ..workOut = workOut ?? this.workOut
|
|
|
+ ..sIn = sIn ?? this.sIn
|
|
|
+ ..sOut = sOut ?? this.sOut
|
|
|
+ ..wIn = wIn ?? this.wIn
|
|
|
+ ..wOut = wOut ?? this.wOut
|
|
|
+ ..reviseHours = reviseHours ?? this.reviseHours
|
|
|
+ ..showStar = showStar ?? this.showStar
|
|
|
+ ..statusList = statusList ?? this.statusList
|
|
|
+ ..actionList = actionList ?? this.actionList;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+JobAppliedListSGRowsCheck $JobAppliedListSGRowsCheckFromJson(Map<String, dynamic> json) {
|
|
|
+ final JobAppliedListSGRowsCheck jobAppliedListSGRowsCheck = JobAppliedListSGRowsCheck();
|
|
|
+ final String? time = jsonConvert.convert<String>(json['time']);
|
|
|
+ if (time != null) {
|
|
|
+ jobAppliedListSGRowsCheck.time = time;
|
|
|
+ }
|
|
|
+ final String? temp = jsonConvert.convert<String>(json['temp']);
|
|
|
+ if (temp != null) {
|
|
|
+ jobAppliedListSGRowsCheck.temp = temp;
|
|
|
+ }
|
|
|
+ final String? image = jsonConvert.convert<String>(json['image']);
|
|
|
+ if (image != null) {
|
|
|
+ jobAppliedListSGRowsCheck.image = image;
|
|
|
+ }
|
|
|
+ final int? changed = jsonConvert.convert<int>(json['changed']);
|
|
|
+ if (changed != null) {
|
|
|
+ jobAppliedListSGRowsCheck.changed = changed;
|
|
|
+ }
|
|
|
+ final String? key = jsonConvert.convert<String>(json['key']);
|
|
|
+ if (key != null) {
|
|
|
+ jobAppliedListSGRowsCheck.key = key;
|
|
|
+ }
|
|
|
+ return jobAppliedListSGRowsCheck;
|
|
|
+}
|
|
|
+
|
|
|
+Map<String, dynamic> $JobAppliedListSGRowsCheckToJson(JobAppliedListSGRowsCheck entity) {
|
|
|
+ final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
+ data['time'] = entity.time;
|
|
|
+ data['temp'] = entity.temp;
|
|
|
+ data['image'] = entity.image;
|
|
|
+ data['changed'] = entity.changed;
|
|
|
+ data['key'] = entity.key;
|
|
|
+ return data;
|
|
|
+}
|
|
|
+
|
|
|
+extension JobAppliedListSGRowsCheckExtension on JobAppliedListSGRowsCheck {
|
|
|
+ JobAppliedListSGRowsCheck copyWith({
|
|
|
+ String? time,
|
|
|
+ String? temp,
|
|
|
+ String? image,
|
|
|
+ int? changed,
|
|
|
+ String? key,
|
|
|
+ }) {
|
|
|
+ return JobAppliedListSGRowsCheck()
|
|
|
+ ..time = time ?? this.time
|
|
|
+ ..temp = temp ?? this.temp
|
|
|
+ ..image = image ?? this.image
|
|
|
+ ..changed = changed ?? this.changed
|
|
|
+ ..key = key ?? this.key;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+JobAppliedListSGRowsStatusList $JobAppliedListSGRowsStatusListFromJson(Map<String, dynamic> json) {
|
|
|
+ final JobAppliedListSGRowsStatusList jobAppliedListSGRowsStatusList = JobAppliedListSGRowsStatusList();
|
|
|
+ final String? value = jsonConvert.convert<String>(json['value']);
|
|
|
+ if (value != null) {
|
|
|
+ jobAppliedListSGRowsStatusList.value = value;
|
|
|
+ }
|
|
|
+ final String? txt = jsonConvert.convert<String>(json['txt']);
|
|
|
+ if (txt != null) {
|
|
|
+ jobAppliedListSGRowsStatusList.txt = txt;
|
|
|
+ }
|
|
|
+ final String? checked = jsonConvert.convert<String>(json['checked']);
|
|
|
+ if (checked != null) {
|
|
|
+ jobAppliedListSGRowsStatusList.checked = checked;
|
|
|
+ }
|
|
|
+ return jobAppliedListSGRowsStatusList;
|
|
|
+}
|
|
|
+
|
|
|
+Map<String, dynamic> $JobAppliedListSGRowsStatusListToJson(JobAppliedListSGRowsStatusList entity) {
|
|
|
+ final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
+ data['value'] = entity.value;
|
|
|
+ data['txt'] = entity.txt;
|
|
|
+ data['checked'] = entity.checked;
|
|
|
+ return data;
|
|
|
+}
|
|
|
+
|
|
|
+extension JobAppliedListSGRowsStatusListExtension on JobAppliedListSGRowsStatusList {
|
|
|
+ JobAppliedListSGRowsStatusList copyWith({
|
|
|
+ String? value,
|
|
|
+ String? txt,
|
|
|
+ String? checked,
|
|
|
+ }) {
|
|
|
+ return JobAppliedListSGRowsStatusList()
|
|
|
+ ..value = value ?? this.value
|
|
|
+ ..txt = txt ?? this.txt
|
|
|
+ ..checked = checked ?? this.checked;
|
|
|
+ }
|
|
|
+}
|