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

AddEditReviseViewSGEntity $AddEditReviseViewSGEntityFromJson(Map<String, dynamic> json) {
  final AddEditReviseViewSGEntity addEditReviseViewSGEntity = AddEditReviseViewSGEntity();
  final String? appliedId = jsonConvert.convert<String>(json['applied_id']);
  if (appliedId != null) {
    addEditReviseViewSGEntity.appliedId = appliedId;
  }
  final String? labourerName = jsonConvert.convert<String>(json['labourer_name']);
  if (labourerName != null) {
    addEditReviseViewSGEntity.labourerName = labourerName;
  }
  final String? jobDate = jsonConvert.convert<String>(json['job_date']);
  if (jobDate != null) {
    addEditReviseViewSGEntity.jobDate = jobDate;
  }
  final String? adjustHours = jsonConvert.convert<String>(json['adjust_hours']);
  if (adjustHours != null) {
    addEditReviseViewSGEntity.adjustHours = adjustHours;
  }
  final String? totalHours = jsonConvert.convert<String>(json['total_hours']);
  if (totalHours != null) {
    addEditReviseViewSGEntity.totalHours = totalHours;
  }
  final String? startTime = jsonConvert.convert<String>(json['start_time']);
  if (startTime != null) {
    addEditReviseViewSGEntity.startTime = startTime;
  }
  final String? endTime = jsonConvert.convert<String>(json['end_time']);
  if (endTime != null) {
    addEditReviseViewSGEntity.endTime = endTime;
  }
  final String? securityIn = jsonConvert.convert<String>(json['security_in']);
  if (securityIn != null) {
    addEditReviseViewSGEntity.securityIn = securityIn;
  }
  final String? securityOut = jsonConvert.convert<String>(json['security_out']);
  if (securityOut != null) {
    addEditReviseViewSGEntity.securityOut = securityOut;
  }
  final String? workIn = jsonConvert.convert<String>(json['work_in']);
  if (workIn != null) {
    addEditReviseViewSGEntity.workIn = workIn;
  }
  final String? workOut = jsonConvert.convert<String>(json['work_out']);
  if (workOut != null) {
    addEditReviseViewSGEntity.workOut = workOut;
  }
  final String? reviseId = jsonConvert.convert<String>(json['revise_id']);
  if (reviseId != null) {
    addEditReviseViewSGEntity.reviseId = reviseId;
  }
  final String? reviseHours = jsonConvert.convert<String>(json['revise_hours']);
  if (reviseHours != null) {
    addEditReviseViewSGEntity.reviseHours = reviseHours;
  }
  final String? reviseMsg = jsonConvert.convert<String>(json['revise_msg']);
  if (reviseMsg != null) {
    addEditReviseViewSGEntity.reviseMsg = reviseMsg;
  }
  return addEditReviseViewSGEntity;
}

Map<String, dynamic> $AddEditReviseViewSGEntityToJson(AddEditReviseViewSGEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['applied_id'] = entity.appliedId;
  data['labourer_name'] = entity.labourerName;
  data['job_date'] = entity.jobDate;
  data['adjust_hours'] = entity.adjustHours;
  data['total_hours'] = entity.totalHours;
  data['start_time'] = entity.startTime;
  data['end_time'] = entity.endTime;
  data['security_in'] = entity.securityIn;
  data['security_out'] = entity.securityOut;
  data['work_in'] = entity.workIn;
  data['work_out'] = entity.workOut;
  data['revise_id'] = entity.reviseId;
  data['revise_hours'] = entity.reviseHours;
  data['revise_msg'] = entity.reviseMsg;
  return data;
}

extension AddEditReviseViewSGEntityExtension on AddEditReviseViewSGEntity {
  AddEditReviseViewSGEntity copyWith({
    String? appliedId,
    String? labourerName,
    String? jobDate,
    String? adjustHours,
    String? totalHours,
    String? startTime,
    String? endTime,
    String? securityIn,
    String? securityOut,
    String? workIn,
    String? workOut,
    String? reviseId,
    String? reviseHours,
    String? reviseMsg,
  }) {
    return AddEditReviseViewSGEntity()
      ..appliedId = appliedId ?? this.appliedId
      ..labourerName = labourerName ?? this.labourerName
      ..jobDate = jobDate ?? this.jobDate
      ..adjustHours = adjustHours ?? this.adjustHours
      ..totalHours = totalHours ?? this.totalHours
      ..startTime = startTime ?? this.startTime
      ..endTime = endTime ?? this.endTime
      ..securityIn = securityIn ?? this.securityIn
      ..securityOut = securityOut ?? this.securityOut
      ..workIn = workIn ?? this.workIn
      ..workOut = workOut ?? this.workOut
      ..reviseId = reviseId ?? this.reviseId
      ..reviseHours = reviseHours ?? this.reviseHours
      ..reviseMsg = reviseMsg ?? this.reviseMsg;
  }
}