|
@@ -0,0 +1,365 @@
|
|
|
+import 'package:domain/generated/json/base/json_convert_content.dart';
|
|
|
+import 'package:domain/entity/response/staff_labour_history_entity.dart';
|
|
|
+
|
|
|
+StaffLabourHistoryEntity $StaffLabourHistoryEntityFromJson(Map<String, dynamic> json) {
|
|
|
+ final StaffLabourHistoryEntity staffLabourHistoryEntity = StaffLabourHistoryEntity();
|
|
|
+ final int? total = jsonConvert.convert<int>(json['total']);
|
|
|
+ if (total != null) {
|
|
|
+ staffLabourHistoryEntity.total = total;
|
|
|
+ }
|
|
|
+ final List<StaffLabourHistoryRows>? rows = (json['rows'] as List<dynamic>?)?.map(
|
|
|
+ (e) => jsonConvert.convert<StaffLabourHistoryRows>(e) as StaffLabourHistoryRows).toList();
|
|
|
+ if (rows != null) {
|
|
|
+ staffLabourHistoryEntity.rows = rows;
|
|
|
+ }
|
|
|
+ return staffLabourHistoryEntity;
|
|
|
+}
|
|
|
+
|
|
|
+Map<String, dynamic> $StaffLabourHistoryEntityToJson(StaffLabourHistoryEntity entity) {
|
|
|
+ final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
+ data['total'] = entity.total;
|
|
|
+ data['rows'] = entity.rows?.map((v) => v.toJson()).toList();
|
|
|
+ return data;
|
|
|
+}
|
|
|
+
|
|
|
+extension StaffLabourHistoryEntityExtension on StaffLabourHistoryEntity {
|
|
|
+ StaffLabourHistoryEntity copyWith({
|
|
|
+ int? total,
|
|
|
+ List<StaffLabourHistoryRows>? rows,
|
|
|
+ }) {
|
|
|
+ return StaffLabourHistoryEntity()
|
|
|
+ ..total = total ?? this.total
|
|
|
+ ..rows = rows ?? this.rows;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+StaffLabourHistoryRows $StaffLabourHistoryRowsFromJson(Map<String, dynamic> json) {
|
|
|
+ final StaffLabourHistoryRows staffLabourHistoryRows = StaffLabourHistoryRows();
|
|
|
+ final int? appliedId = jsonConvert.convert<int>(json['applied_id']);
|
|
|
+ if (appliedId != null) {
|
|
|
+ staffLabourHistoryRows.appliedId = appliedId;
|
|
|
+ }
|
|
|
+ final int? memberId = jsonConvert.convert<int>(json['member_id']);
|
|
|
+ if (memberId != null) {
|
|
|
+ staffLabourHistoryRows.memberId = memberId;
|
|
|
+ }
|
|
|
+ final String? staffName = jsonConvert.convert<String>(json['staff_name']);
|
|
|
+ if (staffName != null) {
|
|
|
+ staffLabourHistoryRows.staffName = staffName;
|
|
|
+ }
|
|
|
+ final String? jobDate = jsonConvert.convert<String>(json['job_date']);
|
|
|
+ if (jobDate != null) {
|
|
|
+ staffLabourHistoryRows.jobDate = jobDate;
|
|
|
+ }
|
|
|
+ final String? jobTitle = jsonConvert.convert<String>(json['job_title']);
|
|
|
+ if (jobTitle != null) {
|
|
|
+ staffLabourHistoryRows.jobTitle = jobTitle;
|
|
|
+ }
|
|
|
+ final String? outletName = jsonConvert.convert<String>(json['outlet_name']);
|
|
|
+ if (outletName != null) {
|
|
|
+ staffLabourHistoryRows.outletName = outletName;
|
|
|
+ }
|
|
|
+ final String? startTime = jsonConvert.convert<String>(json['start_time']);
|
|
|
+ if (startTime != null) {
|
|
|
+ staffLabourHistoryRows.startTime = startTime;
|
|
|
+ }
|
|
|
+ final String? endTime = jsonConvert.convert<String>(json['end_time']);
|
|
|
+ if (endTime != null) {
|
|
|
+ staffLabourHistoryRows.endTime = endTime;
|
|
|
+ }
|
|
|
+ final String? adjustShow = jsonConvert.convert<String>(json['adjust_show']);
|
|
|
+ if (adjustShow != null) {
|
|
|
+ staffLabourHistoryRows.adjustShow = adjustShow;
|
|
|
+ }
|
|
|
+ final String? totalShow = jsonConvert.convert<String>(json['total_show']);
|
|
|
+ if (totalShow != null) {
|
|
|
+ staffLabourHistoryRows.totalShow = totalShow;
|
|
|
+ }
|
|
|
+ final int? totalRooms = jsonConvert.convert<int>(json['total_rooms']);
|
|
|
+ if (totalRooms != null) {
|
|
|
+ staffLabourHistoryRows.totalRooms = totalRooms;
|
|
|
+ }
|
|
|
+ final int? status = jsonConvert.convert<int>(json['status']);
|
|
|
+ if (status != null) {
|
|
|
+ staffLabourHistoryRows.status = status;
|
|
|
+ }
|
|
|
+ final String? statusShow = jsonConvert.convert<String>(json['status_show']);
|
|
|
+ if (statusShow != null) {
|
|
|
+ staffLabourHistoryRows.statusShow = statusShow;
|
|
|
+ }
|
|
|
+ final String? appliedAt = jsonConvert.convert<String>(json['applied_at']);
|
|
|
+ if (appliedAt != null) {
|
|
|
+ staffLabourHistoryRows.appliedAt = appliedAt;
|
|
|
+ }
|
|
|
+ final StaffLabourHistoryRowsSecurityIn? securityIn = jsonConvert.convert<StaffLabourHistoryRowsSecurityIn>(json['security_in']);
|
|
|
+ if (securityIn != null) {
|
|
|
+ staffLabourHistoryRows.securityIn = securityIn;
|
|
|
+ }
|
|
|
+ final StaffLabourHistoryRowsSecurityOut? securityOut = jsonConvert.convert<StaffLabourHistoryRowsSecurityOut>(json['security_out']);
|
|
|
+ if (securityOut != null) {
|
|
|
+ staffLabourHistoryRows.securityOut = securityOut;
|
|
|
+ }
|
|
|
+ final StaffLabourHistoryRowsWorkIn? workIn = jsonConvert.convert<StaffLabourHistoryRowsWorkIn>(json['work_in']);
|
|
|
+ if (workIn != null) {
|
|
|
+ staffLabourHistoryRows.workIn = workIn;
|
|
|
+ }
|
|
|
+ final StaffLabourHistoryRowsWorkOut? workOut = jsonConvert.convert<StaffLabourHistoryRowsWorkOut>(json['work_out']);
|
|
|
+ if (workOut != null) {
|
|
|
+ staffLabourHistoryRows.workOut = workOut;
|
|
|
+ }
|
|
|
+ final int? sIn = jsonConvert.convert<int>(json['s_in']);
|
|
|
+ if (sIn != null) {
|
|
|
+ staffLabourHistoryRows.sIn = sIn;
|
|
|
+ }
|
|
|
+ final int? sOut = jsonConvert.convert<int>(json['s_out']);
|
|
|
+ if (sOut != null) {
|
|
|
+ staffLabourHistoryRows.sOut = sOut;
|
|
|
+ }
|
|
|
+ final int? wIn = jsonConvert.convert<int>(json['w_in']);
|
|
|
+ if (wIn != null) {
|
|
|
+ staffLabourHistoryRows.wIn = wIn;
|
|
|
+ }
|
|
|
+ final int? wOut = jsonConvert.convert<int>(json['w_out']);
|
|
|
+ if (wOut != null) {
|
|
|
+ staffLabourHistoryRows.wOut = wOut;
|
|
|
+ }
|
|
|
+ final List<String>? actionList = (json['action_list'] as List<dynamic>?)?.map(
|
|
|
+ (e) => jsonConvert.convert<String>(e) as String).toList();
|
|
|
+ if (actionList != null) {
|
|
|
+ staffLabourHistoryRows.actionList = actionList;
|
|
|
+ }
|
|
|
+ return staffLabourHistoryRows;
|
|
|
+}
|
|
|
+
|
|
|
+Map<String, dynamic> $StaffLabourHistoryRowsToJson(StaffLabourHistoryRows entity) {
|
|
|
+ final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
+ data['applied_id'] = entity.appliedId;
|
|
|
+ data['member_id'] = entity.memberId;
|
|
|
+ data['staff_name'] = entity.staffName;
|
|
|
+ data['job_date'] = entity.jobDate;
|
|
|
+ data['job_title'] = entity.jobTitle;
|
|
|
+ data['outlet_name'] = entity.outletName;
|
|
|
+ data['start_time'] = entity.startTime;
|
|
|
+ data['end_time'] = entity.endTime;
|
|
|
+ data['adjust_show'] = entity.adjustShow;
|
|
|
+ data['total_show'] = entity.totalShow;
|
|
|
+ data['total_rooms'] = entity.totalRooms;
|
|
|
+ data['status'] = entity.status;
|
|
|
+ data['status_show'] = entity.statusShow;
|
|
|
+ data['applied_at'] = entity.appliedAt;
|
|
|
+ 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['action_list'] = entity.actionList;
|
|
|
+ return data;
|
|
|
+}
|
|
|
+
|
|
|
+extension StaffLabourHistoryRowsExtension on StaffLabourHistoryRows {
|
|
|
+ StaffLabourHistoryRows copyWith({
|
|
|
+ int? appliedId,
|
|
|
+ int? memberId,
|
|
|
+ String? staffName,
|
|
|
+ String? jobDate,
|
|
|
+ String? jobTitle,
|
|
|
+ String? outletName,
|
|
|
+ String? startTime,
|
|
|
+ String? endTime,
|
|
|
+ String? adjustShow,
|
|
|
+ String? totalShow,
|
|
|
+ int? totalRooms,
|
|
|
+ int? status,
|
|
|
+ String? statusShow,
|
|
|
+ String? appliedAt,
|
|
|
+ StaffLabourHistoryRowsSecurityIn? securityIn,
|
|
|
+ StaffLabourHistoryRowsSecurityOut? securityOut,
|
|
|
+ StaffLabourHistoryRowsWorkIn? workIn,
|
|
|
+ StaffLabourHistoryRowsWorkOut? workOut,
|
|
|
+ int? sIn,
|
|
|
+ int? sOut,
|
|
|
+ int? wIn,
|
|
|
+ int? wOut,
|
|
|
+ List<String>? actionList,
|
|
|
+ }) {
|
|
|
+ return StaffLabourHistoryRows()
|
|
|
+ ..appliedId = appliedId ?? this.appliedId
|
|
|
+ ..memberId = memberId ?? this.memberId
|
|
|
+ ..staffName = staffName ?? this.staffName
|
|
|
+ ..jobDate = jobDate ?? this.jobDate
|
|
|
+ ..jobTitle = jobTitle ?? this.jobTitle
|
|
|
+ ..outletName = outletName ?? this.outletName
|
|
|
+ ..startTime = startTime ?? this.startTime
|
|
|
+ ..endTime = endTime ?? this.endTime
|
|
|
+ ..adjustShow = adjustShow ?? this.adjustShow
|
|
|
+ ..totalShow = totalShow ?? this.totalShow
|
|
|
+ ..totalRooms = totalRooms ?? this.totalRooms
|
|
|
+ ..status = status ?? this.status
|
|
|
+ ..statusShow = statusShow ?? this.statusShow
|
|
|
+ ..appliedAt = appliedAt ?? this.appliedAt
|
|
|
+ ..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
|
|
|
+ ..actionList = actionList ?? this.actionList;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+StaffLabourHistoryRowsSecurityIn $StaffLabourHistoryRowsSecurityInFromJson(Map<String, dynamic> json) {
|
|
|
+ final StaffLabourHistoryRowsSecurityIn staffLabourHistoryRowsSecurityIn = StaffLabourHistoryRowsSecurityIn();
|
|
|
+ final String? time = jsonConvert.convert<String>(json['time']);
|
|
|
+ if (time != null) {
|
|
|
+ staffLabourHistoryRowsSecurityIn.time = time;
|
|
|
+ }
|
|
|
+ final dynamic image = json['image'];
|
|
|
+ if (image != null) {
|
|
|
+ staffLabourHistoryRowsSecurityIn.image = image;
|
|
|
+ }
|
|
|
+ final int? changed = jsonConvert.convert<int>(json['changed']);
|
|
|
+ if (changed != null) {
|
|
|
+ staffLabourHistoryRowsSecurityIn.changed = changed;
|
|
|
+ }
|
|
|
+ return staffLabourHistoryRowsSecurityIn;
|
|
|
+}
|
|
|
+
|
|
|
+Map<String, dynamic> $StaffLabourHistoryRowsSecurityInToJson(StaffLabourHistoryRowsSecurityIn entity) {
|
|
|
+ final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
+ data['time'] = entity.time;
|
|
|
+ data['image'] = entity.image;
|
|
|
+ data['changed'] = entity.changed;
|
|
|
+ return data;
|
|
|
+}
|
|
|
+
|
|
|
+extension StaffLabourHistoryRowsSecurityInExtension on StaffLabourHistoryRowsSecurityIn {
|
|
|
+ StaffLabourHistoryRowsSecurityIn copyWith({
|
|
|
+ String? time,
|
|
|
+ dynamic image,
|
|
|
+ int? changed,
|
|
|
+ }) {
|
|
|
+ return StaffLabourHistoryRowsSecurityIn()
|
|
|
+ ..time = time ?? this.time
|
|
|
+ ..image = image ?? this.image
|
|
|
+ ..changed = changed ?? this.changed;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+StaffLabourHistoryRowsSecurityOut $StaffLabourHistoryRowsSecurityOutFromJson(Map<String, dynamic> json) {
|
|
|
+ final StaffLabourHistoryRowsSecurityOut staffLabourHistoryRowsSecurityOut = StaffLabourHistoryRowsSecurityOut();
|
|
|
+ final String? time = jsonConvert.convert<String>(json['time']);
|
|
|
+ if (time != null) {
|
|
|
+ staffLabourHistoryRowsSecurityOut.time = time;
|
|
|
+ }
|
|
|
+ final dynamic image = json['image'];
|
|
|
+ if (image != null) {
|
|
|
+ staffLabourHistoryRowsSecurityOut.image = image;
|
|
|
+ }
|
|
|
+ final int? changed = jsonConvert.convert<int>(json['changed']);
|
|
|
+ if (changed != null) {
|
|
|
+ staffLabourHistoryRowsSecurityOut.changed = changed;
|
|
|
+ }
|
|
|
+ return staffLabourHistoryRowsSecurityOut;
|
|
|
+}
|
|
|
+
|
|
|
+Map<String, dynamic> $StaffLabourHistoryRowsSecurityOutToJson(StaffLabourHistoryRowsSecurityOut entity) {
|
|
|
+ final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
+ data['time'] = entity.time;
|
|
|
+ data['image'] = entity.image;
|
|
|
+ data['changed'] = entity.changed;
|
|
|
+ return data;
|
|
|
+}
|
|
|
+
|
|
|
+extension StaffLabourHistoryRowsSecurityOutExtension on StaffLabourHistoryRowsSecurityOut {
|
|
|
+ StaffLabourHistoryRowsSecurityOut copyWith({
|
|
|
+ String? time,
|
|
|
+ dynamic image,
|
|
|
+ int? changed,
|
|
|
+ }) {
|
|
|
+ return StaffLabourHistoryRowsSecurityOut()
|
|
|
+ ..time = time ?? this.time
|
|
|
+ ..image = image ?? this.image
|
|
|
+ ..changed = changed ?? this.changed;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+StaffLabourHistoryRowsWorkIn $StaffLabourHistoryRowsWorkInFromJson(Map<String, dynamic> json) {
|
|
|
+ final StaffLabourHistoryRowsWorkIn staffLabourHistoryRowsWorkIn = StaffLabourHistoryRowsWorkIn();
|
|
|
+ final String? time = jsonConvert.convert<String>(json['time']);
|
|
|
+ if (time != null) {
|
|
|
+ staffLabourHistoryRowsWorkIn.time = time;
|
|
|
+ }
|
|
|
+ final dynamic image = json['image'];
|
|
|
+ if (image != null) {
|
|
|
+ staffLabourHistoryRowsWorkIn.image = image;
|
|
|
+ }
|
|
|
+ final int? changed = jsonConvert.convert<int>(json['changed']);
|
|
|
+ if (changed != null) {
|
|
|
+ staffLabourHistoryRowsWorkIn.changed = changed;
|
|
|
+ }
|
|
|
+ return staffLabourHistoryRowsWorkIn;
|
|
|
+}
|
|
|
+
|
|
|
+Map<String, dynamic> $StaffLabourHistoryRowsWorkInToJson(StaffLabourHistoryRowsWorkIn entity) {
|
|
|
+ final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
+ data['time'] = entity.time;
|
|
|
+ data['image'] = entity.image;
|
|
|
+ data['changed'] = entity.changed;
|
|
|
+ return data;
|
|
|
+}
|
|
|
+
|
|
|
+extension StaffLabourHistoryRowsWorkInExtension on StaffLabourHistoryRowsWorkIn {
|
|
|
+ StaffLabourHistoryRowsWorkIn copyWith({
|
|
|
+ String? time,
|
|
|
+ dynamic image,
|
|
|
+ int? changed,
|
|
|
+ }) {
|
|
|
+ return StaffLabourHistoryRowsWorkIn()
|
|
|
+ ..time = time ?? this.time
|
|
|
+ ..image = image ?? this.image
|
|
|
+ ..changed = changed ?? this.changed;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+StaffLabourHistoryRowsWorkOut $StaffLabourHistoryRowsWorkOutFromJson(Map<String, dynamic> json) {
|
|
|
+ final StaffLabourHistoryRowsWorkOut staffLabourHistoryRowsWorkOut = StaffLabourHistoryRowsWorkOut();
|
|
|
+ final String? time = jsonConvert.convert<String>(json['time']);
|
|
|
+ if (time != null) {
|
|
|
+ staffLabourHistoryRowsWorkOut.time = time;
|
|
|
+ }
|
|
|
+ final dynamic image = json['image'];
|
|
|
+ if (image != null) {
|
|
|
+ staffLabourHistoryRowsWorkOut.image = image;
|
|
|
+ }
|
|
|
+ final int? changed = jsonConvert.convert<int>(json['changed']);
|
|
|
+ if (changed != null) {
|
|
|
+ staffLabourHistoryRowsWorkOut.changed = changed;
|
|
|
+ }
|
|
|
+ return staffLabourHistoryRowsWorkOut;
|
|
|
+}
|
|
|
+
|
|
|
+Map<String, dynamic> $StaffLabourHistoryRowsWorkOutToJson(StaffLabourHistoryRowsWorkOut entity) {
|
|
|
+ final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
+ data['time'] = entity.time;
|
|
|
+ data['image'] = entity.image;
|
|
|
+ data['changed'] = entity.changed;
|
|
|
+ return data;
|
|
|
+}
|
|
|
+
|
|
|
+extension StaffLabourHistoryRowsWorkOutExtension on StaffLabourHistoryRowsWorkOut {
|
|
|
+ StaffLabourHistoryRowsWorkOut copyWith({
|
|
|
+ String? time,
|
|
|
+ dynamic image,
|
|
|
+ int? changed,
|
|
|
+ }) {
|
|
|
+ return StaffLabourHistoryRowsWorkOut()
|
|
|
+ ..time = time ?? this.time
|
|
|
+ ..image = image ?? this.image
|
|
|
+ ..changed = changed ?? this.changed;
|
|
|
+ }
|
|
|
+}
|