package com.phlx.anchorcollect.entity;

import android.os.Parcel;
import android.os.Parcelable;

import androidx.databinding.BaseObservable;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;

import java.util.Date;
import org.greenrobot.greendao.annotation.Generated;

/**
 * 配种记子对象 zxgl_cattlemating_detaill
 *
 * @author phlx
 * @date 2022-01-10
 */
@Entity
public class BreedingRecordDetailEntity extends BaseObservable implements Parcelable {

    /**
     * unid
     */
    @Id(autoincrement = false)
    private Long unid;

    /**
     * 主表ID
     */
    private Long fUnid;

    /**
     * 配种方式;（本交，受精）
     */
    private String matingStyle;

    /**
     * 冻精注册号
     */
    private String cattleresumeId;

    /**
     * 冻精批次号
     */
    private String frozenSemenBatch;

    /**
     * 其它
     */
    private String other;

    /**
     * 配种日期
     */
    private String matingDate;

    /**
     * 是否返情
     */
    private String isReturn;

    /**
     * 返情日期
     */
    private String backLoveDate;

    /**
     * 预产日期
     */
    private String dueDate;

    /**
     * 配种成功
     */
    private String pregnancy;

    /**
     * 饲养品种（利木赞;西门塔尔等）
     */
    private String raiseVarieties;

    /**
     * 所属种畜站
     */
    private String breedingPlantId;

    /**
     * 部门id
     */
    private Long deptId;

    /**
     * 临时属性 和主表 移动端上传所需（验证数据使用）
     */
    private Long caId;

    /** 是否上传 0未上传，1已上传 */
    private String uploadStatus;


    /** 搜索值 */
    private String searchValue;

    /** 创建者 */
    private String createBy;

    /** 创建时间 */
    private String createTime;

    /** 更新者 */
    private String updateBy;

    /** 更新时间 */
    private String updateTime;

    /** 备注 */
    private String remark;

    public BreedingRecordDetailEntity() {
    }

    protected BreedingRecordDetailEntity(Parcel in) {
        if (in.readByte() == 0) {
            unid = null;
        } else {
            unid = in.readLong();
        }
        if (in.readByte() == 0) {
            fUnid = null;
        } else {
            fUnid = in.readLong();
        }
        matingStyle = in.readString();
        cattleresumeId = in.readString();
        frozenSemenBatch = in.readString();
        other = in.readString();
        matingDate = in.readString();
        isReturn = in.readString();
        backLoveDate = in.readString();
        dueDate = in.readString();
        pregnancy = in.readString();
        raiseVarieties = in.readString();
        breedingPlantId = in.readString();
        if (in.readByte() == 0) {
            deptId = null;
        } else {
            deptId = in.readLong();
        }
        if (in.readByte() == 0) {
            caId = null;
        } else {
            caId = in.readLong();
        }
        uploadStatus = in.readString();
        searchValue = in.readString();
        createBy = in.readString();
        createTime = in.readString();
        updateBy = in.readString();
        updateTime = in.readString();
        remark = in.readString();
    }

    @Generated(hash = 2018405645)
    public BreedingRecordDetailEntity(Long unid, Long fUnid, String matingStyle, String cattleresumeId,
            String frozenSemenBatch, String other, String matingDate, String isReturn, String backLoveDate,
            String dueDate, String pregnancy, String raiseVarieties, String breedingPlantId, Long deptId,
            Long caId, String uploadStatus, String searchValue, String createBy, String createTime,
            String updateBy, String updateTime, String remark) {
        this.unid = unid;
        this.fUnid = fUnid;
        this.matingStyle = matingStyle;
        this.cattleresumeId = cattleresumeId;
        this.frozenSemenBatch = frozenSemenBatch;
        this.other = other;
        this.matingDate = matingDate;
        this.isReturn = isReturn;
        this.backLoveDate = backLoveDate;
        this.dueDate = dueDate;
        this.pregnancy = pregnancy;
        this.raiseVarieties = raiseVarieties;
        this.breedingPlantId = breedingPlantId;
        this.deptId = deptId;
        this.caId = caId;
        this.uploadStatus = uploadStatus;
        this.searchValue = searchValue;
        this.createBy = createBy;
        this.createTime = createTime;
        this.updateBy = updateBy;
        this.updateTime = updateTime;
        this.remark = remark;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        if (unid == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeLong(unid);
        }
        if (fUnid == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeLong(fUnid);
        }
        dest.writeString(matingStyle);
        dest.writeString(cattleresumeId);
        dest.writeString(frozenSemenBatch);
        dest.writeString(other);
        dest.writeString(matingDate);
        dest.writeString(isReturn);
        dest.writeString(backLoveDate);
        dest.writeString(dueDate);
        dest.writeString(pregnancy);
        dest.writeString(raiseVarieties);
        dest.writeString(breedingPlantId);
        if (deptId == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeLong(deptId);
        }
        if (caId == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeLong(caId);
        }
        dest.writeString(uploadStatus);
        dest.writeString(searchValue);
        dest.writeString(createBy);
        dest.writeString(createTime);
        dest.writeString(updateBy);
        dest.writeString(updateTime);
        dest.writeString(remark);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<BreedingRecordDetailEntity> CREATOR = new Creator<BreedingRecordDetailEntity>() {
        @Override
        public BreedingRecordDetailEntity createFromParcel(Parcel in) {
            return new BreedingRecordDetailEntity(in);
        }

        @Override
        public BreedingRecordDetailEntity[] newArray(int size) {
            return new BreedingRecordDetailEntity[size];
        }
    };

    public Long getUnid() {
        return unid;
    }

    public void setUnid(Long unid) {
        this.unid = unid;
    }

    public Long getfUnid() {
        return fUnid;
    }

    public void setfUnid(Long fUnid) {
        this.fUnid = fUnid;
    }

    public String getMatingStyle() {
        return matingStyle;
    }

    public void setMatingStyle(String matingStyle) {
        this.matingStyle = matingStyle;
    }

    public String getCattleresumeId() {
        return cattleresumeId;
    }

    public void setCattleresumeId(String cattleresumeId) {
        this.cattleresumeId = cattleresumeId;
    }

    public String getFrozenSemenBatch() {
        return frozenSemenBatch;
    }

    public void setFrozenSemenBatch(String frozenSemenBatch) {
        this.frozenSemenBatch = frozenSemenBatch;
    }

    public String getOther() {
        return other;
    }

    public void setOther(String other) {
        this.other = other;
    }

    public String getMatingDate() {
        return matingDate;
    }

    public void setMatingDate(String matingDate) {
        this.matingDate = matingDate;
    }

    public String getIsReturn() {
        return isReturn;
    }

    public void setIsReturn(String isReturn) {
        this.isReturn = isReturn;
    }

    public String getBackLoveDate() {
        return backLoveDate;
    }

    public void setBackLoveDate(String backLoveDate) {
        this.backLoveDate = backLoveDate;
    }

    public String getDueDate() {
        return dueDate;
    }

    public void setDueDate(String dueDate) {
        this.dueDate = dueDate;
    }

    public String getPregnancy() {
        return pregnancy;
    }

    public void setPregnancy(String pregnancy) {
        this.pregnancy = pregnancy;
    }

    public String getRaiseVarieties() {
        return raiseVarieties;
    }

    public void setRaiseVarieties(String raiseVarieties) {
        this.raiseVarieties = raiseVarieties;
    }

    public String getBreedingPlantId() {
        return breedingPlantId;
    }

    public void setBreedingPlantId(String breedingPlantId) {
        this.breedingPlantId = breedingPlantId;
    }

    public Long getDeptId() {
        return deptId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public Long getCaId() {
        return caId;
    }

    public void setCaId(Long caId) {
        this.caId = caId;
    }

    public String getUploadStatus() {
        return uploadStatus;
    }

    public void setUploadStatus(String uploadStatus) {
        this.uploadStatus = uploadStatus;
    }

    public String getSearchValue() {
        return searchValue;
    }

    public void setSearchValue(String searchValue) {
        this.searchValue = searchValue;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public String toString() {
        return "BreedingRecordDetailEntity{" +
                "unid=" + unid +
                ", fUnid=" + fUnid +
                ", matingStyle='" + matingStyle + '\'' +
                ", cattleresumeId='" + cattleresumeId + '\'' +
                ", frozenSemenBatch='" + frozenSemenBatch + '\'' +
                ", other='" + other + '\'' +
                ", matingDate='" + matingDate + '\'' +
                ", isReturn='" + isReturn + '\'' +
                ", backLoveDate='" + backLoveDate + '\'' +
                ", dueDate='" + dueDate + '\'' +
                ", pregnancy='" + pregnancy + '\'' +
                ", raiseVarieties='" + raiseVarieties + '\'' +
                ", breedingPlantId='" + breedingPlantId + '\'' +
                ", deptId=" + deptId +
                ", caId=" + caId +
                ", uploadStatus='" + uploadStatus + '\'' +
                ", searchValue='" + searchValue + '\'' +
                ", createBy='" + createBy + '\'' +
                ", createTime='" + createTime + '\'' +
                ", updateBy='" + updateBy + '\'' +
                ", updateTime='" + updateTime + '\'' +
                ", remark='" + remark + '\'' +
                '}';
    }

    public Long getFUnid() {
        return this.fUnid;
    }

    public void setFUnid(Long fUnid) {
        this.fUnid = fUnid;
    }
}
