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

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

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

extension JobListRemarkViewEntityExtension on JobListRemarkViewEntity {
  JobListRemarkViewEntity copyWith({
    int? appliedId,
    String? memberName,
    String? labourerName,
    double? attitudeRate,
    double? groomingRate,
    double? performanceRate,
    double? experienceRate,
    String? content,
    String? feedback,
    String? disabled,
  }) {
    return JobListRemarkViewEntity()
      ..appliedId = appliedId ?? this.appliedId
      ..memberName = memberName ?? this.memberName
      ..labourerName = labourerName ?? this.labourerName
      ..attitudeRate = attitudeRate ?? this.attitudeRate
      ..groomingRate = groomingRate ?? this.groomingRate
      ..performanceRate = performanceRate ?? this.performanceRate
      ..experienceRate = experienceRate ?? this.experienceRate
      ..content = content ?? this.content
      ..feedback = feedback ?? this.feedback
      ..disabled = disabled ?? this.disabled;
  }
}