import 'package:anchor_collect_flutter/generated/json/base/json_convert_content.dart';
import 'package:anchor_collect_flutter/models/immune_batch_entity.dart';
import 'package:isar/isar.dart';


ImmuneBatchEntity $ImmuneBatchEntityFromJson(Map<String, dynamic> json) {
  final ImmuneBatchEntity immuneBatchEntity = ImmuneBatchEntity();
  final Id? id = jsonConvert.convert<Id>(json['id']);
  if (id != null) {
    immuneBatchEntity.id = id;
  }
  final String? unid = jsonConvert.convert<String>(json['unid']);
  if (unid != null) {
    immuneBatchEntity.unid = unid;
  }
  final String? circleNo = jsonConvert.convert<String>(json['circleNo']);
  if (circleNo != null) {
    immuneBatchEntity.circleNo = circleNo;
  }
  final String? immuneExp = jsonConvert.convert<String>(json['immuneExp']);
  if (immuneExp != null) {
    immuneBatchEntity.immuneExp = immuneExp;
  }
  final String? immuneDate = jsonConvert.convert<String>(json['immuneDate']);
  if (immuneDate != null) {
    immuneBatchEntity.immuneDate = immuneDate;
  }
  final String? immunePerson = jsonConvert.convert<String>(json['immunePerson']);
  if (immunePerson != null) {
    immuneBatchEntity.immunePerson = immunePerson;
  }
  final String? perinatalPeriod = jsonConvert.convert<String>(json['perinatalPeriod']);
  if (perinatalPeriod != null) {
    immuneBatchEntity.perinatalPeriod = perinatalPeriod;
  }
  final String? vaccineName = jsonConvert.convert<String>(json['vaccineName']);
  if (vaccineName != null) {
    immuneBatchEntity.vaccineName = vaccineName;
  }
  final String? lotnumber = jsonConvert.convert<String>(json['lotnumber']);
  if (lotnumber != null) {
    immuneBatchEntity.lotnumber = lotnumber;
  }
  final String? manufacturer = jsonConvert.convert<String>(json['manufacturer']);
  if (manufacturer != null) {
    immuneBatchEntity.manufacturer = manufacturer;
  }
  final String? specifications = jsonConvert.convert<String>(json['specifications']);
  if (specifications != null) {
    immuneBatchEntity.specifications = specifications;
  }
  final String? immuneDosage = jsonConvert.convert<String>(json['immuneDosage']);
  if (immuneDosage != null) {
    immuneBatchEntity.immuneDosage = immuneDosage;
  }
  final String? immuneMethod = jsonConvert.convert<String>(json['immuneMethod']);
  if (immuneMethod != null) {
    immuneBatchEntity.immuneMethod = immuneMethod;
  }
  final String? uploadStatus = jsonConvert.convert<String>(json['uploadStatus']);
  if (uploadStatus != null) {
    immuneBatchEntity.uploadStatus = uploadStatus;
  }
  final String? deptId = jsonConvert.convert<String>(json['deptId']);
  if (deptId != null) {
    immuneBatchEntity.deptId = deptId;
  }
  final String? searchValue = jsonConvert.convert<String>(json['searchValue']);
  if (searchValue != null) {
    immuneBatchEntity.searchValue = searchValue;
  }
  final String? createBy = jsonConvert.convert<String>(json['createBy']);
  if (createBy != null) {
    immuneBatchEntity.createBy = createBy;
  }
  final String? createTime = jsonConvert.convert<String>(json['createTime']);
  if (createTime != null) {
    immuneBatchEntity.createTime = createTime;
  }
  final String? updateBy = jsonConvert.convert<String>(json['updateBy']);
  if (updateBy != null) {
    immuneBatchEntity.updateBy = updateBy;
  }
  final String? updateTime = jsonConvert.convert<String>(json['updateTime']);
  if (updateTime != null) {
    immuneBatchEntity.updateTime = updateTime;
  }
  final String? remark = jsonConvert.convert<String>(json['remark']);
  if (remark != null) {
    immuneBatchEntity.remark = remark;
  }
  return immuneBatchEntity;
}

Map<String, dynamic> $ImmuneBatchEntityToJson(ImmuneBatchEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['unid'] = entity.unid;
  data['circleNo'] = entity.circleNo;
  data['immuneExp'] = entity.immuneExp;
  data['immuneDate'] = entity.immuneDate;
  data['immunePerson'] = entity.immunePerson;
  data['perinatalPeriod'] = entity.perinatalPeriod;
  data['vaccineName'] = entity.vaccineName;
  data['lotnumber'] = entity.lotnumber;
  data['manufacturer'] = entity.manufacturer;
  data['specifications'] = entity.specifications;
  data['immuneDosage'] = entity.immuneDosage;
  data['immuneMethod'] = entity.immuneMethod;
  data['uploadStatus'] = entity.uploadStatus;
  data['deptId'] = entity.deptId;
  data['searchValue'] = entity.searchValue;
  data['createBy'] = entity.createBy;
  data['createTime'] = entity.createTime;
  data['updateBy'] = entity.updateBy;
  data['updateTime'] = entity.updateTime;
  data['remark'] = entity.remark;
  return data;
}

extension ImmuneBatchEntityExtension on ImmuneBatchEntity {
  ImmuneBatchEntity copyWith({
    Id? id,
    String? unid,
    String? circleNo,
    String? immuneExp,
    String? immuneDate,
    String? immunePerson,
    String? perinatalPeriod,
    String? vaccineName,
    String? lotnumber,
    String? manufacturer,
    String? specifications,
    String? immuneDosage,
    String? immuneMethod,
    String? uploadStatus,
    String? deptId,
    String? searchValue,
    String? createBy,
    String? createTime,
    String? updateBy,
    String? updateTime,
    String? remark,
  }) {
    return ImmuneBatchEntity()
      ..id = id ?? this.id
      ..unid = unid ?? this.unid
      ..circleNo = circleNo ?? this.circleNo
      ..immuneExp = immuneExp ?? this.immuneExp
      ..immuneDate = immuneDate ?? this.immuneDate
      ..immunePerson = immunePerson ?? this.immunePerson
      ..perinatalPeriod = perinatalPeriod ?? this.perinatalPeriod
      ..vaccineName = vaccineName ?? this.vaccineName
      ..lotnumber = lotnumber ?? this.lotnumber
      ..manufacturer = manufacturer ?? this.manufacturer
      ..specifications = specifications ?? this.specifications
      ..immuneDosage = immuneDosage ?? this.immuneDosage
      ..immuneMethod = immuneMethod ?? this.immuneMethod
      ..uploadStatus = uploadStatus ?? this.uploadStatus
      ..deptId = deptId ?? this.deptId
      ..searchValue = searchValue ?? this.searchValue
      ..createBy = createBy ?? this.createBy
      ..createTime = createTime ?? this.createTime
      ..updateBy = updateBy ?? this.updateBy
      ..updateTime = updateTime ?? this.updateTime
      ..remark = remark ?? this.remark;
  }
}