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

StaffRequestReportEntity $StaffRequestReportEntityFromJson(Map<String, dynamic> json) {
  final StaffRequestReportEntity staffRequestReportEntity = StaffRequestReportEntity();
  final String? name = jsonConvert.convert<String>(json['name']);
  if (name != null) {
    staffRequestReportEntity.name = name;
  }
  final int? num = jsonConvert.convert<int>(json['num']);
  if (num != null) {
    staffRequestReportEntity.num = num;
  }
  final String? ratio = jsonConvert.convert<String>(json['ratio']);
  if (ratio != null) {
    staffRequestReportEntity.ratio = ratio;
  }
  final String? bg = jsonConvert.convert<String>(json['bg']);
  if (bg != null) {
    staffRequestReportEntity.bg = bg;
  }
  return staffRequestReportEntity;
}

Map<String, dynamic> $StaffRequestReportEntityToJson(StaffRequestReportEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['name'] = entity.name;
  data['num'] = entity.num;
  data['ratio'] = entity.ratio;
  data['bg'] = entity.bg;
  return data;
}

extension StaffRequestReportEntityExtension on StaffRequestReportEntity {
  StaffRequestReportEntity copyWith({
    String? name,
    int? num,
    String? ratio,
    String? bg,
  }) {
    return StaffRequestReportEntity()
      ..name = name ?? this.name
      ..num = num ?? this.num
      ..ratio = ratio ?? this.ratio
      ..bg = bg ?? this.bg;
  }
}