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.Generated;
import org.greenrobot.greendao.annotation.Id;

/**
 * 种畜管理_种畜卡表
 * 作者 : lei
 * 时间 : 2018/12/3 10 : 59
 */
@Entity
public class CardEntity extends BaseObservable implements Parcelable {
    //主键
    private Long id;
    /**
     * unid主键
     */
    @Id(autoincrement = false)
    private long unid;
    /**
     * 登记号
     */
    private String registrationNo;
    /**
     * 个体号
     */
    private String individualNo;
    /**
     * 类型(牛，羊，马，骆驼，山羊)
     */
    private String type;
    /**
     * 圈号
     */
    private String circleNo;
    /**
     * 品种
     */
    private String varieties;
    /**
     * 品种子类
     */
    private String subtypes;
    /**
     * 出生日期
     */
    private String birthdate;
    /**
     * 种畜性别
     */
    private String sex;
    /**
     * 等级
     */
    private String grade;
    /**
     * 父登记号
     */
    private String fatherReg;
    /**
     * 母登记号
     */
    private String motherReg;
    /**
     * 胎次
     */
    private String childTime;
    /**
     * 是否双胎
     */
    private String isTwins;
    /**
     * 是否淘汰 0-在用，1-淘汰
     */
    private String isOut;
    /**
     * 出生重量
     */
    private String birthHeavy;
    /**
     * 离乳重
     */
    private String fromMilkHeavy;
    /**
     * 6月龄重
     */
    private String junHeavy;
    /**
     * 12月外貌评分
     */
    private String decAppScore;
    /**
     * 出生难易度
     */
    private String easeBirth;
    /**
     * 是否初乳
     */
    private String isColostrum;
    /**
     * 是否去角
     */
    private String isDehorning;
    /**
     * 状态（育种，育成，淘汰，出售）
     */
    private String status;
    /**
     * 本地路径
     */
    private String path;
    /**
     * 图片流文件
     */
    private String imgStr;

    /**
     * 更新状态
     */
    private String updateId;
    /**
     * 数据权限ID
     */
    private String dataId;

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

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

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

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


    /**
     * 权限标识
     */
    private String permissions;

    /**
     * 从服务器接收，时间戳，终端需要上传给服务器，
     */
    private String inputTime;

    public CardEntity() {
    }

    protected CardEntity(Parcel in) {
        if (in.readByte() == 0) {
            id = null;
        } else {
            id = in.readLong();
        }
        unid = in.readLong();
        registrationNo = in.readString();
        individualNo = in.readString();
        type = in.readString();
        circleNo = in.readString();
        varieties = in.readString();
        subtypes = in.readString();
        birthdate = in.readString();
        sex = in.readString();
        grade = in.readString();
        fatherReg = in.readString();
        motherReg = in.readString();
        childTime = in.readString();
        isTwins = in.readString();
        isOut = in.readString();
        birthHeavy = in.readString();
        fromMilkHeavy = in.readString();
        junHeavy = in.readString();
        decAppScore = in.readString();
        easeBirth = in.readString();
        isColostrum = in.readString();
        isDehorning = in.readString();
        status = in.readString();
        path = in.readString();
        imgStr = in.readString();
        updateId = in.readString();
        dataId = in.readString();
        createBy = in.readString();
        createTime = in.readString();
        updateBy = in.readString();
        updateTime = in.readString();
        permissions = in.readString();
        inputTime = in.readString();
    }

    @Generated(hash = 720310658)
    public CardEntity(Long id, long unid, String registrationNo,
            String individualNo, String type, String circleNo, String varieties,
            String subtypes, String birthdate, String sex, String grade,
            String fatherReg, String motherReg, String childTime, String isTwins,
            String isOut, String birthHeavy, String fromMilkHeavy, String junHeavy,
            String decAppScore, String easeBirth, String isColostrum,
            String isDehorning, String status, String path, String imgStr,
            String updateId, String dataId, String createBy, String createTime,
            String updateBy, String updateTime, String permissions,
            String inputTime) {
        this.id = id;
        this.unid = unid;
        this.registrationNo = registrationNo;
        this.individualNo = individualNo;
        this.type = type;
        this.circleNo = circleNo;
        this.varieties = varieties;
        this.subtypes = subtypes;
        this.birthdate = birthdate;
        this.sex = sex;
        this.grade = grade;
        this.fatherReg = fatherReg;
        this.motherReg = motherReg;
        this.childTime = childTime;
        this.isTwins = isTwins;
        this.isOut = isOut;
        this.birthHeavy = birthHeavy;
        this.fromMilkHeavy = fromMilkHeavy;
        this.junHeavy = junHeavy;
        this.decAppScore = decAppScore;
        this.easeBirth = easeBirth;
        this.isColostrum = isColostrum;
        this.isDehorning = isDehorning;
        this.status = status;
        this.path = path;
        this.imgStr = imgStr;
        this.updateId = updateId;
        this.dataId = dataId;
        this.createBy = createBy;
        this.createTime = createTime;
        this.updateBy = updateBy;
        this.updateTime = updateTime;
        this.permissions = permissions;
        this.inputTime = inputTime;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        if (id == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeLong(id);
        }
        dest.writeLong(unid);
        dest.writeString(registrationNo);
        dest.writeString(individualNo);
        dest.writeString(type);
        dest.writeString(circleNo);
        dest.writeString(varieties);
        dest.writeString(subtypes);
        dest.writeString(birthdate);
        dest.writeString(sex);
        dest.writeString(grade);
        dest.writeString(fatherReg);
        dest.writeString(motherReg);
        dest.writeString(childTime);
        dest.writeString(isTwins);
        dest.writeString(isOut);
        dest.writeString(birthHeavy);
        dest.writeString(fromMilkHeavy);
        dest.writeString(junHeavy);
        dest.writeString(decAppScore);
        dest.writeString(easeBirth);
        dest.writeString(isColostrum);
        dest.writeString(isDehorning);
        dest.writeString(status);
        dest.writeString(path);
        dest.writeString(imgStr);
        dest.writeString(updateId);
        dest.writeString(dataId);
        dest.writeString(createBy);
        dest.writeString(createTime);
        dest.writeString(updateBy);
        dest.writeString(updateTime);
        dest.writeString(permissions);
        dest.writeString(inputTime);
    }

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

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

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

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public long getUnid() {
        return unid;
    }

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

    public String getRegistrationNo() {
        return registrationNo;
    }

    public void setRegistrationNo(String registrationNo) {
        this.registrationNo = registrationNo;
    }

    public String getIndividualNo() {
        return individualNo;
    }

    public void setIndividualNo(String individualNo) {
        this.individualNo = individualNo;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getCircleNo() {
        return circleNo;
    }

    public void setCircleNo(String circleNo) {
        this.circleNo = circleNo;
    }

    public String getVarieties() {
        return varieties;
    }

    public void setVarieties(String varieties) {
        this.varieties = varieties;
    }

    public String getSubtypes() {
        return subtypes;
    }

    public void setSubtypes(String subtypes) {
        this.subtypes = subtypes;
    }

    public String getBirthdate() {
        return birthdate;
    }

    public void setBirthdate(String birthdate) {
        this.birthdate = birthdate;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getGrade() {
        return grade;
    }

    public void setGrade(String grade) {
        this.grade = grade;
    }

    public String getFatherReg() {
        return fatherReg;
    }

    public void setFatherReg(String fatherReg) {
        this.fatherReg = fatherReg;
    }

    public String getMotherReg() {
        return motherReg;
    }

    public void setMotherReg(String motherReg) {
        this.motherReg = motherReg;
    }

    public String getChildTime() {
        return childTime;
    }

    public void setChildTime(String childTime) {
        this.childTime = childTime;
    }

    public String getIsTwins() {
        return isTwins;
    }

    public void setIsTwins(String isTwins) {
        this.isTwins = isTwins;
    }

    public String getIsOut() {
        return isOut;
    }

    public void setIsOut(String isOut) {
        this.isOut = isOut;
    }

    public String getBirthHeavy() {
        return birthHeavy;
    }

    public void setBirthHeavy(String birthHeavy) {
        this.birthHeavy = birthHeavy;
    }

    public String getFromMilkHeavy() {
        return fromMilkHeavy;
    }

    public void setFromMilkHeavy(String fromMilkHeavy) {
        this.fromMilkHeavy = fromMilkHeavy;
    }

    public String getJunHeavy() {
        return junHeavy;
    }

    public void setJunHeavy(String junHeavy) {
        this.junHeavy = junHeavy;
    }

    public String getDecAppScore() {
        return decAppScore;
    }

    public void setDecAppScore(String decAppScore) {
        this.decAppScore = decAppScore;
    }

    public String getEaseBirth() {
        return easeBirth;
    }

    public void setEaseBirth(String easeBirth) {
        this.easeBirth = easeBirth;
    }

    public String getIsColostrum() {
        return isColostrum;
    }

    public void setIsColostrum(String isColostrum) {
        this.isColostrum = isColostrum;
    }

    public String getIsDehorning() {
        return isDehorning;
    }

    public void setIsDehorning(String isDehorning) {
        this.isDehorning = isDehorning;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getImgStr() {
        return imgStr;
    }

    public void setImgStr(String imgStr) {
        this.imgStr = imgStr;
    }

    public String getUpdateId() {
        return updateId;
    }

    public void setUpdateId(String updateId) {
        this.updateId = updateId;
    }

    public String getDataId() {
        return dataId;
    }

    public void setDataId(String dataId) {
        this.dataId = dataId;
    }

    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 getPermissions() {
        return permissions;
    }

    public void setPermissions(String permissions) {
        this.permissions = permissions;
    }

    public String getInputTime() {
        return inputTime;
    }

    public void setInputTime(String inputTime) {
        this.inputTime = inputTime;
    }
}
