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

CheckSuccessEntity $CheckSuccessEntityFromJson(Map<String, dynamic> json) {
  final CheckSuccessEntity checkSuccessEntity = CheckSuccessEntity();
  final int? appliedId = jsonConvert.convert<int>(json['applied_id']);
  if (appliedId != null) {
    checkSuccessEntity.appliedId = appliedId;
  }
  final String? checkImg = jsonConvert.convert<String>(json['check_img']);
  if (checkImg != null) {
    checkSuccessEntity.checkImg = checkImg;
  }
  final String? checkTime = jsonConvert.convert<String>(json['check_time']);
  if (checkTime != null) {
    checkSuccessEntity.checkTime = checkTime;
  }
  return checkSuccessEntity;
}

Map<String, dynamic> $CheckSuccessEntityToJson(CheckSuccessEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['applied_id'] = entity.appliedId;
  data['check_img'] = entity.checkImg;
  data['check_time'] = entity.checkTime;
  return data;
}

extension CheckSuccessEntityExtension on CheckSuccessEntity {
  CheckSuccessEntity copyWith({
    int? appliedId,
    String? checkImg,
    String? checkTime,
  }) {
    return CheckSuccessEntity()
      ..appliedId = appliedId ?? this.appliedId
      ..checkImg = checkImg ?? this.checkImg
      ..checkTime = checkTime ?? this.checkTime;
  }
}