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


PerformanceEntity $PerformanceEntityFromJson(Map<String, dynamic> json) {
  final PerformanceEntity performanceEntity = PerformanceEntity();
  final Id? id = jsonConvert.convert<Id>(json['id']);
  if (id != null) {
    performanceEntity.id = id;
  }
  final String? unid = jsonConvert.convert<String>(json['unid']);
  if (unid != null) {
    performanceEntity.unid = unid;
  }
  final String? cattleresumeId = jsonConvert.convert<String>(json['cattleresumeId']);
  if (cattleresumeId != null) {
    performanceEntity.cattleresumeId = cattleresumeId;
  }
  final String? registrationNo = jsonConvert.convert<String>(json['registrationNo']);
  if (registrationNo != null) {
    performanceEntity.registrationNo = registrationNo;
  }
  final String? individualNo = jsonConvert.convert<String>(json['individualNo']);
  if (individualNo != null) {
    performanceEntity.individualNo = individualNo;
  }
  final String? fatherReg = jsonConvert.convert<String>(json['fatherReg']);
  if (fatherReg != null) {
    performanceEntity.fatherReg = fatherReg;
  }
  final String? motherReg = jsonConvert.convert<String>(json['motherReg']);
  if (motherReg != null) {
    performanceEntity.motherReg = motherReg;
  }
  final String? age = jsonConvert.convert<String>(json['age']);
  if (age != null) {
    performanceEntity.age = age;
  }
  final String? measureDate = jsonConvert.convert<String>(json['measureDate']);
  if (measureDate != null) {
    performanceEntity.measureDate = measureDate;
  }
  final double? height = jsonConvert.convert<double>(json['height']);
  if (height != null) {
    performanceEntity.height = height;
  }
  final double? length = jsonConvert.convert<double>(json['length']);
  if (length != null) {
    performanceEntity.length = length;
  }
  final double? bust = jsonConvert.convert<double>(json['bust']);
  if (bust != null) {
    performanceEntity.bust = bust;
  }
  final double? weight = jsonConvert.convert<double>(json['weight']);
  if (weight != null) {
    performanceEntity.weight = weight;
  }
  final double? chestWidth = jsonConvert.convert<double>(json['chestWidth']);
  if (chestWidth != null) {
    performanceEntity.chestWidth = chestWidth;
  }
  final double? chestDeep = jsonConvert.convert<double>(json['chestDeep']);
  if (chestDeep != null) {
    performanceEntity.chestDeep = chestDeep;
  }
  final double? waistWidth = jsonConvert.convert<double>(json['waistWidth']);
  if (waistWidth != null) {
    performanceEntity.waistWidth = waistWidth;
  }
  final double? crossWidth = jsonConvert.convert<double>(json['crossWidth']);
  if (crossWidth != null) {
    performanceEntity.crossWidth = crossWidth;
  }
  final double? crossHeight = jsonConvert.convert<double>(json['crossHeight']);
  if (crossHeight != null) {
    performanceEntity.crossHeight = crossHeight;
  }
  final double? guanWei = jsonConvert.convert<double>(json['guanWei']);
  if (guanWei != null) {
    performanceEntity.guanWei = guanWei;
  }
  final double? eyeMuscleArea = jsonConvert.convert<double>(json['eyeMuscleArea']);
  if (eyeMuscleArea != null) {
    performanceEntity.eyeMuscleArea = eyeMuscleArea;
  }
  final String? grade = jsonConvert.convert<String>(json['grade']);
  if (grade != null) {
    performanceEntity.grade = grade;
  }
  final double? hairLength = jsonConvert.convert<double>(json['hairLength']);
  if (hairLength != null) {
    performanceEntity.hairLength = hairLength;
  }
  final double? hairFineness = jsonConvert.convert<double>(json['hairFineness']);
  if (hairFineness != null) {
    performanceEntity.hairFineness = hairFineness;
  }
  final double? shearing = jsonConvert.convert<double>(json['shearing']);
  if (shearing != null) {
    performanceEntity.shearing = shearing;
  }
  final double? backWidth = jsonConvert.convert<double>(json['backWidth']);
  if (backWidth != null) {
    performanceEntity.backWidth = backWidth;
  }
  final String? breedRes = jsonConvert.convert<String>(json['breedRes']);
  if (breedRes != null) {
    performanceEntity.breedRes = breedRes;
  }
  final String? health = jsonConvert.convert<String>(json['health']);
  if (health != null) {
    performanceEntity.health = health;
  }
  final String? immune = jsonConvert.convert<String>(json['immune']);
  if (immune != null) {
    performanceEntity.immune = immune;
  }
  final String? uploadStatus = jsonConvert.convert<String>(json['uploadStatus']);
  if (uploadStatus != null) {
    performanceEntity.uploadStatus = uploadStatus;
  }
  final String? deptId = jsonConvert.convert<String>(json['deptId']);
  if (deptId != null) {
    performanceEntity.deptId = deptId;
  }
  final String? searchValue = jsonConvert.convert<String>(json['searchValue']);
  if (searchValue != null) {
    performanceEntity.searchValue = searchValue;
  }
  final String? createBy = jsonConvert.convert<String>(json['createBy']);
  if (createBy != null) {
    performanceEntity.createBy = createBy;
  }
  final String? createTime = jsonConvert.convert<String>(json['createTime']);
  if (createTime != null) {
    performanceEntity.createTime = createTime;
  }
  final String? updateBy = jsonConvert.convert<String>(json['updateBy']);
  if (updateBy != null) {
    performanceEntity.updateBy = updateBy;
  }
  final String? updateTime = jsonConvert.convert<String>(json['updateTime']);
  if (updateTime != null) {
    performanceEntity.updateTime = updateTime;
  }
  final String? remark = jsonConvert.convert<String>(json['remark']);
  if (remark != null) {
    performanceEntity.remark = remark;
  }
  return performanceEntity;
}

Map<String, dynamic> $PerformanceEntityToJson(PerformanceEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['unid'] = entity.unid;
  data['cattleresumeId'] = entity.cattleresumeId;
  data['registrationNo'] = entity.registrationNo;
  data['individualNo'] = entity.individualNo;
  data['fatherReg'] = entity.fatherReg;
  data['motherReg'] = entity.motherReg;
  data['age'] = entity.age;
  data['measureDate'] = entity.measureDate;
  data['height'] = entity.height;
  data['length'] = entity.length;
  data['bust'] = entity.bust;
  data['weight'] = entity.weight;
  data['chestWidth'] = entity.chestWidth;
  data['chestDeep'] = entity.chestDeep;
  data['waistWidth'] = entity.waistWidth;
  data['crossWidth'] = entity.crossWidth;
  data['crossHeight'] = entity.crossHeight;
  data['guanWei'] = entity.guanWei;
  data['eyeMuscleArea'] = entity.eyeMuscleArea;
  data['grade'] = entity.grade;
  data['hairLength'] = entity.hairLength;
  data['hairFineness'] = entity.hairFineness;
  data['shearing'] = entity.shearing;
  data['backWidth'] = entity.backWidth;
  data['breedRes'] = entity.breedRes;
  data['health'] = entity.health;
  data['immune'] = entity.immune;
  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 PerformanceEntityExtension on PerformanceEntity {
  PerformanceEntity copyWith({
    Id? id,
    String? unid,
    String? cattleresumeId,
    String? registrationNo,
    String? individualNo,
    String? fatherReg,
    String? motherReg,
    String? age,
    String? measureDate,
    double? height,
    double? length,
    double? bust,
    double? weight,
    double? chestWidth,
    double? chestDeep,
    double? waistWidth,
    double? crossWidth,
    double? crossHeight,
    double? guanWei,
    double? eyeMuscleArea,
    String? grade,
    double? hairLength,
    double? hairFineness,
    double? shearing,
    double? backWidth,
    String? breedRes,
    String? health,
    String? immune,
    String? uploadStatus,
    String? deptId,
    String? searchValue,
    String? createBy,
    String? createTime,
    String? updateBy,
    String? updateTime,
    String? remark,
  }) {
    return PerformanceEntity()
      ..id = id ?? this.id
      ..unid = unid ?? this.unid
      ..cattleresumeId = cattleresumeId ?? this.cattleresumeId
      ..registrationNo = registrationNo ?? this.registrationNo
      ..individualNo = individualNo ?? this.individualNo
      ..fatherReg = fatherReg ?? this.fatherReg
      ..motherReg = motherReg ?? this.motherReg
      ..age = age ?? this.age
      ..measureDate = measureDate ?? this.measureDate
      ..height = height ?? this.height
      ..length = length ?? this.length
      ..bust = bust ?? this.bust
      ..weight = weight ?? this.weight
      ..chestWidth = chestWidth ?? this.chestWidth
      ..chestDeep = chestDeep ?? this.chestDeep
      ..waistWidth = waistWidth ?? this.waistWidth
      ..crossWidth = crossWidth ?? this.crossWidth
      ..crossHeight = crossHeight ?? this.crossHeight
      ..guanWei = guanWei ?? this.guanWei
      ..eyeMuscleArea = eyeMuscleArea ?? this.eyeMuscleArea
      ..grade = grade ?? this.grade
      ..hairLength = hairLength ?? this.hairLength
      ..hairFineness = hairFineness ?? this.hairFineness
      ..shearing = shearing ?? this.shearing
      ..backWidth = backWidth ?? this.backWidth
      ..breedRes = breedRes ?? this.breedRes
      ..health = health ?? this.health
      ..immune = immune ?? this.immune
      ..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;
  }
}