import 'package:domain/generated/json/base/json_convert_content.dart';
import 'package:domain/entity/response/job_list_applied_staff_list_entity.dart';

JobListAppliedStaffListEntity $JobListAppliedStaffListEntityFromJson(Map<String, dynamic> json) {
  final JobListAppliedStaffListEntity jobListAppliedStaffListEntity = JobListAppliedStaffListEntity();
  final int? total = jsonConvert.convert<int>(json['total']);
  if (total != null) {
    jobListAppliedStaffListEntity.total = total;
  }
  final List<JobListAppliedStaffListRows>? rows = (json['rows'] as List<dynamic>?)?.map(
          (e) => jsonConvert.convert<JobListAppliedStaffListRows>(e) as JobListAppliedStaffListRows).toList();
  if (rows != null) {
    jobListAppliedStaffListEntity.rows = rows;
  }
  return jobListAppliedStaffListEntity;
}

Map<String, dynamic> $JobListAppliedStaffListEntityToJson(JobListAppliedStaffListEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['total'] = entity.total;
  data['rows'] = entity.rows?.map((v) => v.toJson()).toList();
  return data;
}

extension JobListAppliedStaffListEntityExtension on JobListAppliedStaffListEntity {
  JobListAppliedStaffListEntity copyWith({
    int? total,
    List<JobListAppliedStaffListRows>? rows,
  }) {
    return JobListAppliedStaffListEntity()
      ..total = total ?? this.total
      ..rows = rows ?? this.rows;
  }
}

JobListAppliedStaffListRows $JobListAppliedStaffListRowsFromJson(Map<String, dynamic> json) {
  final JobListAppliedStaffListRows jobListAppliedStaffListRows = JobListAppliedStaffListRows();
  final int? appliedId = jsonConvert.convert<int>(json['applied_id']);
  if (appliedId != null) {
    jobListAppliedStaffListRows.appliedId = appliedId;
  }
  final int? memberId = jsonConvert.convert<int>(json['member_id']);
  if (memberId != null) {
    jobListAppliedStaffListRows.memberId = memberId;
  }
  final String? staffName = jsonConvert.convert<String>(json['staff_name']);
  if (staffName != null) {
    jobListAppliedStaffListRows.staffName = staffName;
  }
  final String? startTime = jsonConvert.convert<String>(json['start_time']);
  if (startTime != null) {
    jobListAppliedStaffListRows.startTime = startTime;
  }
  final String? endTime = jsonConvert.convert<String>(json['end_time']);
  if (endTime != null) {
    jobListAppliedStaffListRows.endTime = endTime;
  }
  final String? adjustShow = jsonConvert.convert<String>(json['adjust_show']);
  if (adjustShow != null) {
    jobListAppliedStaffListRows.adjustShow = adjustShow;
  }
  final int? totalShow = jsonConvert.convert<int>(json['total_show']);
  if (totalShow != null) {
    jobListAppliedStaffListRows.totalShow = totalShow;
  }
  final int? totalRooms = jsonConvert.convert<int>(json['total_rooms']);
  if (totalRooms != null) {
    jobListAppliedStaffListRows.totalRooms = totalRooms;
  }
  final int? status = jsonConvert.convert<int>(json['status']);
  if (status != null) {
    jobListAppliedStaffListRows.status = status;
  }
  final String? statusShow = jsonConvert.convert<String>(json['status_show']);
  if (statusShow != null) {
    jobListAppliedStaffListRows.statusShow = statusShow;
  }
  final String? appliedAt = jsonConvert.convert<String>(json['applied_at']);
  if (appliedAt != null) {
    jobListAppliedStaffListRows.appliedAt = appliedAt;
  }
  final JobListAppliedStaffListRowsSecurityIn? securityIn = jsonConvert.convert<JobListAppliedStaffListRowsSecurityIn>(json['security_in']);
  if (securityIn != null) {
    jobListAppliedStaffListRows.securityIn = securityIn;
  }
  final JobListAppliedStaffListRowsSecurityOut? securityOut = jsonConvert.convert<JobListAppliedStaffListRowsSecurityOut>(json['security_out']);
  if (securityOut != null) {
    jobListAppliedStaffListRows.securityOut = securityOut;
  }
  final JobListAppliedStaffListRowsWorkIn? workIn = jsonConvert.convert<JobListAppliedStaffListRowsWorkIn>(json['work_in']);
  if (workIn != null) {
    jobListAppliedStaffListRows.workIn = workIn;
  }
  final JobListAppliedStaffListRowsWorkOut? workOut = jsonConvert.convert<JobListAppliedStaffListRowsWorkOut>(json['work_out']);
  if (workOut != null) {
    jobListAppliedStaffListRows.workOut = workOut;
  }
  final int? sIn = jsonConvert.convert<int>(json['s_in']);
  if (sIn != null) {
    jobListAppliedStaffListRows.sIn = sIn;
  }
  final int? sOut = jsonConvert.convert<int>(json['s_out']);
  if (sOut != null) {
    jobListAppliedStaffListRows.sOut = sOut;
  }
  final int? wIn = jsonConvert.convert<int>(json['w_in']);
  if (wIn != null) {
    jobListAppliedStaffListRows.wIn = wIn;
  }
  final int? wOut = jsonConvert.convert<int>(json['w_out']);
  if (wOut != null) {
    jobListAppliedStaffListRows.wOut = wOut;
  }
  final List<String>? actionList = (json['action_list'] as List<dynamic>?)?.map(
          (e) => jsonConvert.convert<String>(e) as String).toList();
  if (actionList != null) {
    jobListAppliedStaffListRows.actionList = actionList;
  }
  final bool? isSelected = jsonConvert.convert<bool>(json['isSelected']);
  if (isSelected != null) {
    jobListAppliedStaffListRows.isSelected = isSelected;
  }
  return jobListAppliedStaffListRows;
}

Map<String, dynamic> $JobListAppliedStaffListRowsToJson(JobListAppliedStaffListRows entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['applied_id'] = entity.appliedId;
  data['member_id'] = entity.memberId;
  data['staff_name'] = entity.staffName;
  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;
  data['isSelected'] = entity.isSelected;
  return data;
}

extension JobListAppliedStaffListRowsExtension on JobListAppliedStaffListRows {
  JobListAppliedStaffListRows copyWith({
    int? appliedId,
    int? memberId,
    String? staffName,
    String? startTime,
    String? endTime,
    String? adjustShow,
    int? totalShow,
    int? totalRooms,
    int? status,
    String? statusShow,
    String? appliedAt,
    JobListAppliedStaffListRowsSecurityIn? securityIn,
    JobListAppliedStaffListRowsSecurityOut? securityOut,
    JobListAppliedStaffListRowsWorkIn? workIn,
    JobListAppliedStaffListRowsWorkOut? workOut,
    int? sIn,
    int? sOut,
    int? wIn,
    int? wOut,
    List<String>? actionList,
    bool? isSelected,
  }) {
    return JobListAppliedStaffListRows()
      ..appliedId = appliedId ?? this.appliedId
      ..memberId = memberId ?? this.memberId
      ..staffName = staffName ?? this.staffName
      ..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
      ..isSelected = isSelected ?? this.isSelected;
  }
}

JobListAppliedStaffListRowsSecurityIn $JobListAppliedStaffListRowsSecurityInFromJson(Map<String, dynamic> json) {
  final JobListAppliedStaffListRowsSecurityIn jobListAppliedStaffListRowsSecurityIn = JobListAppliedStaffListRowsSecurityIn();
  final String? time = jsonConvert.convert<String>(json['time']);
  if (time != null) {
    jobListAppliedStaffListRowsSecurityIn.time = time;
  }
  final dynamic image = json['image'];
  if (image != null) {
    jobListAppliedStaffListRowsSecurityIn.image = image;
  }
  final int? changed = jsonConvert.convert<int>(json['changed']);
  if (changed != null) {
    jobListAppliedStaffListRowsSecurityIn.changed = changed;
  }
  return jobListAppliedStaffListRowsSecurityIn;
}

Map<String, dynamic> $JobListAppliedStaffListRowsSecurityInToJson(JobListAppliedStaffListRowsSecurityIn entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['time'] = entity.time;
  data['image'] = entity.image;
  data['changed'] = entity.changed;
  return data;
}

extension JobListAppliedStaffListRowsSecurityInExtension on JobListAppliedStaffListRowsSecurityIn {
  JobListAppliedStaffListRowsSecurityIn copyWith({
    String? time,
    dynamic image,
    int? changed,
  }) {
    return JobListAppliedStaffListRowsSecurityIn()
      ..time = time ?? this.time
      ..image = image ?? this.image
      ..changed = changed ?? this.changed;
  }
}

JobListAppliedStaffListRowsSecurityOut $JobListAppliedStaffListRowsSecurityOutFromJson(Map<String, dynamic> json) {
  final JobListAppliedStaffListRowsSecurityOut jobListAppliedStaffListRowsSecurityOut = JobListAppliedStaffListRowsSecurityOut();
  final String? time = jsonConvert.convert<String>(json['time']);
  if (time != null) {
    jobListAppliedStaffListRowsSecurityOut.time = time;
  }
  final dynamic image = json['image'];
  if (image != null) {
    jobListAppliedStaffListRowsSecurityOut.image = image;
  }
  final int? changed = jsonConvert.convert<int>(json['changed']);
  if (changed != null) {
    jobListAppliedStaffListRowsSecurityOut.changed = changed;
  }
  return jobListAppliedStaffListRowsSecurityOut;
}

Map<String, dynamic> $JobListAppliedStaffListRowsSecurityOutToJson(JobListAppliedStaffListRowsSecurityOut entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['time'] = entity.time;
  data['image'] = entity.image;
  data['changed'] = entity.changed;
  return data;
}

extension JobListAppliedStaffListRowsSecurityOutExtension on JobListAppliedStaffListRowsSecurityOut {
  JobListAppliedStaffListRowsSecurityOut copyWith({
    String? time,
    dynamic image,
    int? changed,
  }) {
    return JobListAppliedStaffListRowsSecurityOut()
      ..time = time ?? this.time
      ..image = image ?? this.image
      ..changed = changed ?? this.changed;
  }
}

JobListAppliedStaffListRowsWorkIn $JobListAppliedStaffListRowsWorkInFromJson(Map<String, dynamic> json) {
  final JobListAppliedStaffListRowsWorkIn jobListAppliedStaffListRowsWorkIn = JobListAppliedStaffListRowsWorkIn();
  final String? time = jsonConvert.convert<String>(json['time']);
  if (time != null) {
    jobListAppliedStaffListRowsWorkIn.time = time;
  }
  final dynamic image = json['image'];
  if (image != null) {
    jobListAppliedStaffListRowsWorkIn.image = image;
  }
  final int? changed = jsonConvert.convert<int>(json['changed']);
  if (changed != null) {
    jobListAppliedStaffListRowsWorkIn.changed = changed;
  }
  return jobListAppliedStaffListRowsWorkIn;
}

Map<String, dynamic> $JobListAppliedStaffListRowsWorkInToJson(JobListAppliedStaffListRowsWorkIn entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['time'] = entity.time;
  data['image'] = entity.image;
  data['changed'] = entity.changed;
  return data;
}

extension JobListAppliedStaffListRowsWorkInExtension on JobListAppliedStaffListRowsWorkIn {
  JobListAppliedStaffListRowsWorkIn copyWith({
    String? time,
    dynamic image,
    int? changed,
  }) {
    return JobListAppliedStaffListRowsWorkIn()
      ..time = time ?? this.time
      ..image = image ?? this.image
      ..changed = changed ?? this.changed;
  }
}

JobListAppliedStaffListRowsWorkOut $JobListAppliedStaffListRowsWorkOutFromJson(Map<String, dynamic> json) {
  final JobListAppliedStaffListRowsWorkOut jobListAppliedStaffListRowsWorkOut = JobListAppliedStaffListRowsWorkOut();
  final String? time = jsonConvert.convert<String>(json['time']);
  if (time != null) {
    jobListAppliedStaffListRowsWorkOut.time = time;
  }
  final dynamic image = json['image'];
  if (image != null) {
    jobListAppliedStaffListRowsWorkOut.image = image;
  }
  final int? changed = jsonConvert.convert<int>(json['changed']);
  if (changed != null) {
    jobListAppliedStaffListRowsWorkOut.changed = changed;
  }
  return jobListAppliedStaffListRowsWorkOut;
}

Map<String, dynamic> $JobListAppliedStaffListRowsWorkOutToJson(JobListAppliedStaffListRowsWorkOut entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['time'] = entity.time;
  data['image'] = entity.image;
  data['changed'] = entity.changed;
  return data;
}

extension JobListAppliedStaffListRowsWorkOutExtension on JobListAppliedStaffListRowsWorkOut {
  JobListAppliedStaffListRowsWorkOut copyWith({
    String? time,
    dynamic image,
    int? changed,
  }) {
    return JobListAppliedStaffListRowsWorkOut()
      ..time = time ?? this.time
      ..image = image ?? this.image
      ..changed = changed ?? this.changed;
  }
}