check_success_entity.g.dart 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import 'package:domain/generated/json/base/json_convert_content.dart';
  2. import 'package:domain/entity/response/check_success_entity.dart';
  3. CheckSuccessEntity $CheckSuccessEntityFromJson(Map<String, dynamic> json) {
  4. final CheckSuccessEntity checkSuccessEntity = CheckSuccessEntity();
  5. final int? appliedId = jsonConvert.convert<int>(json['applied_id']);
  6. if (appliedId != null) {
  7. checkSuccessEntity.appliedId = appliedId;
  8. }
  9. final String? checkImg = jsonConvert.convert<String>(json['check_img']);
  10. if (checkImg != null) {
  11. checkSuccessEntity.checkImg = checkImg;
  12. }
  13. final String? checkTime = jsonConvert.convert<String>(json['check_time']);
  14. if (checkTime != null) {
  15. checkSuccessEntity.checkTime = checkTime;
  16. }
  17. return checkSuccessEntity;
  18. }
  19. Map<String, dynamic> $CheckSuccessEntityToJson(CheckSuccessEntity entity) {
  20. final Map<String, dynamic> data = <String, dynamic>{};
  21. data['applied_id'] = entity.appliedId;
  22. data['check_img'] = entity.checkImg;
  23. data['check_time'] = entity.checkTime;
  24. return data;
  25. }
  26. extension CheckSuccessEntityExtension on CheckSuccessEntity {
  27. CheckSuccessEntity copyWith({
  28. int? appliedId,
  29. String? checkImg,
  30. String? checkTime,
  31. }) {
  32. return CheckSuccessEntity()
  33. ..appliedId = appliedId ?? this.appliedId
  34. ..checkImg = checkImg ?? this.checkImg
  35. ..checkTime = checkTime ?? this.checkTime;
  36. }
  37. }