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


CattleResumeEntity $CattleResumeEntityFromJson(Map<String, dynamic> json) {
  final CattleResumeEntity cattleResumeEntity = CattleResumeEntity();
  final Id? id = jsonConvert.convert<Id>(json['id']);
  if (id != null) {
    cattleResumeEntity.id = id;
  }
  final String? unid = jsonConvert.convert<String>(json['unid']);
  if (unid != null) {
    cattleResumeEntity.unid = unid;
  }
  final String? registrationNo = jsonConvert.convert<String>(json['registrationNo']);
  if (registrationNo != null) {
    cattleResumeEntity.registrationNo = registrationNo;
  }
  final String? individualNo = jsonConvert.convert<String>(json['individualNo']);
  if (individualNo != null) {
    cattleResumeEntity.individualNo = individualNo;
  }
  final String? circleNo = jsonConvert.convert<String>(json['circleNo']);
  if (circleNo != null) {
    cattleResumeEntity.circleNo = circleNo;
  }
  final String? raiseType = jsonConvert.convert<String>(json['raiseType']);
  if (raiseType != null) {
    cattleResumeEntity.raiseType = raiseType;
  }
  final String? raiseVarieties = jsonConvert.convert<String>(json['raiseVarieties']);
  if (raiseVarieties != null) {
    cattleResumeEntity.raiseVarieties = raiseVarieties;
  }
  final String? birthdate = jsonConvert.convert<String>(json['birthdate']);
  if (birthdate != null) {
    cattleResumeEntity.birthdate = birthdate;
  }
  final double? birthHeavy = jsonConvert.convert<double>(json['birthHeavy']);
  if (birthHeavy != null) {
    cattleResumeEntity.birthHeavy = birthHeavy;
  }
  final String? sex = jsonConvert.convert<String>(json['sex']);
  if (sex != null) {
    cattleResumeEntity.sex = sex;
  }
  final String? birthDifficulty = jsonConvert.convert<String>(json['birthDifficulty']);
  if (birthDifficulty != null) {
    cattleResumeEntity.birthDifficulty = birthDifficulty;
  }
  final String? isTwins = jsonConvert.convert<String>(json['isTwins']);
  if (isTwins != null) {
    cattleResumeEntity.isTwins = isTwins;
  }
  final String? childTime = jsonConvert.convert<String>(json['childTime']);
  if (childTime != null) {
    cattleResumeEntity.childTime = childTime;
  }
  final String? grade = jsonConvert.convert<String>(json['grade']);
  if (grade != null) {
    cattleResumeEntity.grade = grade;
  }
  final String? fatherReg = jsonConvert.convert<String>(json['fatherReg']);
  if (fatherReg != null) {
    cattleResumeEntity.fatherReg = fatherReg;
  }
  final String? motherReg = jsonConvert.convert<String>(json['motherReg']);
  if (motherReg != null) {
    cattleResumeEntity.motherReg = motherReg;
  }
  final double? fromMilkHeavy = jsonConvert.convert<double>(json['fromMilkHeavy']);
  if (fromMilkHeavy != null) {
    cattleResumeEntity.fromMilkHeavy = fromMilkHeavy;
  }
  final String? health = jsonConvert.convert<String>(json['health']);
  if (health != null) {
    cattleResumeEntity.health = health;
  }
  final String? junHeavy = jsonConvert.convert<String>(json['junHeavy']);
  if (junHeavy != null) {
    cattleResumeEntity.junHeavy = junHeavy;
  }
  final String? decAppScore = jsonConvert.convert<String>(json['decAppScore']);
  if (decAppScore != null) {
    cattleResumeEntity.decAppScore = decAppScore;
  }
  final String? photo = jsonConvert.convert<String>(json['photo']);
  if (photo != null) {
    cattleResumeEntity.photo = photo;
  }
  final String? photoPath = jsonConvert.convert<String>(json['photoPath']);
  if (photoPath != null) {
    cattleResumeEntity.photoPath = photoPath;
  }
  final String? status = jsonConvert.convert<String>(json['status']);
  if (status != null) {
    cattleResumeEntity.status = status;
  }
  final int? isOut = jsonConvert.convert<int>(json['isOut']);
  if (isOut != null) {
    cattleResumeEntity.isOut = isOut;
  }
  final int? age = jsonConvert.convert<int>(json['age']);
  if (age != null) {
    cattleResumeEntity.age = age;
  }
  final String? colour = jsonConvert.convert<String>(json['colour']);
  if (colour != null) {
    cattleResumeEntity.colour = colour;
  }
  final String? inputTime = jsonConvert.convert<String>(json['inputTime']);
  if (inputTime != null) {
    cattleResumeEntity.inputTime = inputTime;
  }
  final String? deptId = jsonConvert.convert<String>(json['deptId']);
  if (deptId != null) {
    cattleResumeEntity.deptId = deptId;
  }
  final String? uploadStatus = jsonConvert.convert<String>(json['uploadStatus']);
  if (uploadStatus != null) {
    cattleResumeEntity.uploadStatus = uploadStatus;
  }
  final String? uploadTime = jsonConvert.convert<String>(json['uploadTime']);
  if (uploadTime != null) {
    cattleResumeEntity.uploadTime = uploadTime;
  }
  final String? createBy = jsonConvert.convert<String>(json['createBy']);
  if (createBy != null) {
    cattleResumeEntity.createBy = createBy;
  }
  final String? createTime = jsonConvert.convert<String>(json['createTime']);
  if (createTime != null) {
    cattleResumeEntity.createTime = createTime;
  }
  final String? updateBy = jsonConvert.convert<String>(json['updateBy']);
  if (updateBy != null) {
    cattleResumeEntity.updateBy = updateBy;
  }
  final String? updateTime = jsonConvert.convert<String>(json['updateTime']);
  if (updateTime != null) {
    cattleResumeEntity.updateTime = updateTime;
  }
  final String? remark = jsonConvert.convert<String>(json['remark']);
  if (remark != null) {
    cattleResumeEntity.remark = remark;
  }
  return cattleResumeEntity;
}

Map<String, dynamic> $CattleResumeEntityToJson(CattleResumeEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['unid'] = entity.unid;
  data['registrationNo'] = entity.registrationNo;
  data['individualNo'] = entity.individualNo;
  data['circleNo'] = entity.circleNo;
  data['raiseType'] = entity.raiseType;
  data['raiseVarieties'] = entity.raiseVarieties;
  data['birthdate'] = entity.birthdate;
  data['birthHeavy'] = entity.birthHeavy;
  data['sex'] = entity.sex;
  data['birthDifficulty'] = entity.birthDifficulty;
  data['isTwins'] = entity.isTwins;
  data['childTime'] = entity.childTime;
  data['grade'] = entity.grade;
  data['fatherReg'] = entity.fatherReg;
  data['motherReg'] = entity.motherReg;
  data['fromMilkHeavy'] = entity.fromMilkHeavy;
  data['health'] = entity.health;
  data['junHeavy'] = entity.junHeavy;
  data['decAppScore'] = entity.decAppScore;
  data['photo'] = entity.photo;
  data['photoPath'] = entity.photoPath;
  data['status'] = entity.status;
  data['isOut'] = entity.isOut;
  data['age'] = entity.age;
  data['colour'] = entity.colour;
  data['inputTime'] = entity.inputTime;
  data['deptId'] = entity.deptId;
  data['uploadStatus'] = entity.uploadStatus;
  data['uploadTime'] = entity.uploadTime;
  data['createBy'] = entity.createBy;
  data['createTime'] = entity.createTime;
  data['updateBy'] = entity.updateBy;
  data['updateTime'] = entity.updateTime;
  data['remark'] = entity.remark;
  return data;
}

extension CattleResumeEntityExtension on CattleResumeEntity {
  CattleResumeEntity copyWith({
    Id? id,
    String? unid,
    String? registrationNo,
    String? individualNo,
    String? circleNo,
    String? raiseType,
    String? raiseVarieties,
    String? birthdate,
    double? birthHeavy,
    String? sex,
    String? birthDifficulty,
    String? isTwins,
    String? childTime,
    String? grade,
    String? fatherReg,
    String? motherReg,
    double? fromMilkHeavy,
    String? health,
    String? junHeavy,
    String? decAppScore,
    String? photo,
    String? photoPath,
    String? status,
    int? isOut,
    int? age,
    String? colour,
    String? inputTime,
    String? deptId,
    String? uploadStatus,
    String? uploadTime,
    String? createBy,
    String? createTime,
    String? updateBy,
    String? updateTime,
    String? remark,
  }) {
    return CattleResumeEntity()
      ..id = id ?? this.id
      ..unid = unid ?? this.unid
      ..registrationNo = registrationNo ?? this.registrationNo
      ..individualNo = individualNo ?? this.individualNo
      ..circleNo = circleNo ?? this.circleNo
      ..raiseType = raiseType ?? this.raiseType
      ..raiseVarieties = raiseVarieties ?? this.raiseVarieties
      ..birthdate = birthdate ?? this.birthdate
      ..birthHeavy = birthHeavy ?? this.birthHeavy
      ..sex = sex ?? this.sex
      ..birthDifficulty = birthDifficulty ?? this.birthDifficulty
      ..isTwins = isTwins ?? this.isTwins
      ..childTime = childTime ?? this.childTime
      ..grade = grade ?? this.grade
      ..fatherReg = fatherReg ?? this.fatherReg
      ..motherReg = motherReg ?? this.motherReg
      ..fromMilkHeavy = fromMilkHeavy ?? this.fromMilkHeavy
      ..health = health ?? this.health
      ..junHeavy = junHeavy ?? this.junHeavy
      ..decAppScore = decAppScore ?? this.decAppScore
      ..photo = photo ?? this.photo
      ..photoPath = photoPath ?? this.photoPath
      ..status = status ?? this.status
      ..isOut = isOut ?? this.isOut
      ..age = age ?? this.age
      ..colour = colour ?? this.colour
      ..inputTime = inputTime ?? this.inputTime
      ..deptId = deptId ?? this.deptId
      ..uploadStatus = uploadStatus ?? this.uploadStatus
      ..uploadTime = uploadTime ?? this.uploadTime
      ..createBy = createBy ?? this.createBy
      ..createTime = createTime ?? this.createTime
      ..updateBy = updateBy ?? this.updateBy
      ..updateTime = updateTime ?? this.updateTime
      ..remark = remark ?? this.remark;
  }
}