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

JobAppliedRemarkViewSGEntity $JobAppliedRemarkViewSGEntityFromJson(Map<String, dynamic> json) {
  final JobAppliedRemarkViewSGEntity jobAppliedRemarkViewSGEntity = JobAppliedRemarkViewSGEntity();
  final double? attitudeRate = jsonConvert.convert<double>(json['attitude_rate']);
  if (attitudeRate != null) {
    jobAppliedRemarkViewSGEntity.attitudeRate = attitudeRate;
  }
  final double? groomingRate = jsonConvert.convert<double>(json['grooming_rate']);
  if (groomingRate != null) {
    jobAppliedRemarkViewSGEntity.groomingRate = groomingRate;
  }
  final double? performanceRate = jsonConvert.convert<double>(json['performance_rate']);
  if (performanceRate != null) {
    jobAppliedRemarkViewSGEntity.performanceRate = performanceRate;
  }
  final double? experienceRate = jsonConvert.convert<double>(json['experience_rate']);
  if (experienceRate != null) {
    jobAppliedRemarkViewSGEntity.experienceRate = experienceRate;
  }
  final String? feedback = jsonConvert.convert<String>(json['feedback']);
  if (feedback != null) {
    jobAppliedRemarkViewSGEntity.feedback = feedback;
  }
  final String? appliedId = jsonConvert.convert<String>(json['applied_id']);
  if (appliedId != null) {
    jobAppliedRemarkViewSGEntity.appliedId = appliedId;
  }
  final String? labourerName = jsonConvert.convert<String>(json['labourer_name']);
  if (labourerName != null) {
    jobAppliedRemarkViewSGEntity.labourerName = labourerName;
  }
  final String? disabled = jsonConvert.convert<String>(json['disabled']);
  if (disabled != null) {
    jobAppliedRemarkViewSGEntity.disabled = disabled;
  }
  return jobAppliedRemarkViewSGEntity;
}

Map<String, dynamic> $JobAppliedRemarkViewSGEntityToJson(JobAppliedRemarkViewSGEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['attitude_rate'] = entity.attitudeRate;
  data['grooming_rate'] = entity.groomingRate;
  data['performance_rate'] = entity.performanceRate;
  data['experience_rate'] = entity.experienceRate;
  data['feedback'] = entity.feedback;
  data['applied_id'] = entity.appliedId;
  data['labourer_name'] = entity.labourerName;
  data['disabled'] = entity.disabled;
  return data;
}

extension JobAppliedRemarkViewSGEntityExtension on JobAppliedRemarkViewSGEntity {
  JobAppliedRemarkViewSGEntity copyWith({
    double? attitudeRate,
    double? groomingRate,
    double? performanceRate,
    double? experienceRate,
    String? feedback,
    String? appliedId,
    String? labourerName,
    String? disabled,
  }) {
    return JobAppliedRemarkViewSGEntity()
      ..attitudeRate = attitudeRate ?? this.attitudeRate
      ..groomingRate = groomingRate ?? this.groomingRate
      ..performanceRate = performanceRate ?? this.performanceRate
      ..experienceRate = experienceRate ?? this.experienceRate
      ..feedback = feedback ?? this.feedback
      ..appliedId = appliedId ?? this.appliedId
      ..labourerName = labourerName ?? this.labourerName
      ..disabled = disabled ?? this.disabled;
  }
}