package com.phlx.wool.entity;

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

import androidx.databinding.BaseObservable;

import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;

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

/**
 * <pre>
 *     author : lei
 *     e-mail : 18600395998@163.com
 *     time   : 2020/04/10
 *     desc   : 打标记录表
 *     version: 1.0
 * </pre>
 */
@Entity
public class Marking extends BaseObservable implements Parcelable {

    /**
     * 耳标内码(tid)
     */
    @Id
    @SerializedName("innercode")
    private String Tid;

    /**
     * 养殖单位名称
     */
    @SerializedName("managername")
    private String managerName;
    /**
     * 养殖单位代码
     */
    @SerializedName("pastureunitid")
    private String managerCode;

    /**
     * 羊身份证(EPC)
     */
    @SerializedName("slugno")
    private String Epc;



    /**
     * 出生日期
     */
    @SerializedName("birthdatetime")
    private String birthTime;

    /**
     * 是否种羊
     */
    @SerializedName("iskindsheep")
    private int isBreedSheep;

    /**
     * 品种代码
     */
    @SerializedName("ancestryid")
    private String varietyCode;

    /**
     * 品种名称
     */
    @SerializedName("ancestryname")
    private String varietyName;

    /**
     * 出生地
     */
    @SerializedName("birthplace")
    private String birthPlace;

    /**
     * 性别--是否公羊
     */
    @SerializedName("sex")
    private int sex;

    /**
     * 出生重量
     */
    @SerializedName("birthweight")
    private String birthWeight;

    /**
     * 兽医代码
     */
    @SerializedName("farrierid")
    private String veterinaryCode;

    /**
     * 兽医名字
     */
    @SerializedName("farriername")
    private String veterinaryName;

    /**
     * 胎次
     */
    @SerializedName("birthcount")
    private String birthNum;

    /**
     * 是否双胞胎
     */
    @SerializedName("isdoublebirth")
    private int isTwins;

    /**
     * 母羊
     */
    @SerializedName("mothercardid")
    private String eweEpc;

    /**
     * 父羊
     */
    @SerializedName("fathercardid")
    private String RamEpc;

    /**
     * 备注
     */
    @SerializedName("remark")
    private String remark;

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

    /**
     * 创建时间
     */
    @Expose(serialize = false, deserialize = false)
    private String createTime;

    /**
     * 数据状态 0--上传成功，1----未上传或上传失败
     */
    private int status;

    /**
     * 合法状态 0 非法 1 合法
     */
    @SerializedName("faultcard")
    private String isLegalStatus;

    /**
     * 状态 默认0
     */
    @SerializedName("state")
    private String state;



    public Marking() {
    }

    protected Marking(Parcel in) {
        Tid = in.readString();
        managerName = in.readString();
        managerCode = in.readString();
        Epc = in.readString();
        birthTime = in.readString();
        isBreedSheep = in.readInt();
        varietyCode = in.readString();
        varietyName = in.readString();
        birthPlace = in.readString();
        sex = in.readInt();
        birthWeight = in.readString();
        veterinaryCode = in.readString();
        veterinaryName = in.readString();
        birthNum = in.readString();
        isTwins = in.readInt();
        eweEpc = in.readString();
        RamEpc = in.readString();
        remark = in.readString();
        createBy = in.readString();
        createTime = in.readString();
        status = in.readInt();
        isLegalStatus = in.readString();
        state = in.readString();
    }

    @Generated(hash = 631254713)
    public Marking(String Tid, String managerName, String managerCode, String Epc,
            String birthTime, int isBreedSheep, String varietyCode,
            String varietyName, String birthPlace, int sex, String birthWeight,
            String veterinaryCode, String veterinaryName, String birthNum,
            int isTwins, String eweEpc, String RamEpc, String remark,
            String createBy, String createTime, int status, String isLegalStatus,
            String state) {
        this.Tid = Tid;
        this.managerName = managerName;
        this.managerCode = managerCode;
        this.Epc = Epc;
        this.birthTime = birthTime;
        this.isBreedSheep = isBreedSheep;
        this.varietyCode = varietyCode;
        this.varietyName = varietyName;
        this.birthPlace = birthPlace;
        this.sex = sex;
        this.birthWeight = birthWeight;
        this.veterinaryCode = veterinaryCode;
        this.veterinaryName = veterinaryName;
        this.birthNum = birthNum;
        this.isTwins = isTwins;
        this.eweEpc = eweEpc;
        this.RamEpc = RamEpc;
        this.remark = remark;
        this.createBy = createBy;
        this.createTime = createTime;
        this.status = status;
        this.isLegalStatus = isLegalStatus;
        this.state = state;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(Tid);
        dest.writeString(managerName);
        dest.writeString(managerCode);
        dest.writeString(Epc);
        dest.writeString(birthTime);
        dest.writeInt(isBreedSheep);
        dest.writeString(varietyCode);
        dest.writeString(varietyName);
        dest.writeString(birthPlace);
        dest.writeInt(sex);
        dest.writeString(birthWeight);
        dest.writeString(veterinaryCode);
        dest.writeString(veterinaryName);
        dest.writeString(birthNum);
        dest.writeInt(isTwins);
        dest.writeString(eweEpc);
        dest.writeString(RamEpc);
        dest.writeString(remark);
        dest.writeString(createBy);
        dest.writeString(createTime);
        dest.writeInt(status);
        dest.writeString(isLegalStatus);
        dest.writeString(state);
    }

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

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

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

    public String getTid() {
        return Tid;
    }

    public void setTid(String tid) {
        Tid = tid;
    }

    public String getManagerName() {
        return managerName;
    }

    public void setManagerName(String managerName) {
        this.managerName = managerName;
    }

    public String getManagerCode() {
        return managerCode;
    }

    public void setManagerCode(String managerCode) {
        this.managerCode = managerCode;
    }

    public String getEpc() {
        return Epc;
    }

    public void setEpc(String epc) {
        Epc = epc;
    }

    public String getBirthTime() {
        return birthTime;
    }

    public void setBirthTime(String birthTime) {
        this.birthTime = birthTime;
    }

    public int getIsBreedSheep() {
        return isBreedSheep;
    }

    public void setIsBreedSheep(int isBreedSheep) {
        this.isBreedSheep = isBreedSheep;
    }

    public String getVarietyCode() {
        return varietyCode;
    }

    public void setVarietyCode(String varietyCode) {
        this.varietyCode = varietyCode;
    }

    public String getVarietyName() {
        return varietyName;
    }

    public void setVarietyName(String varietyName) {
        this.varietyName = varietyName;
    }

    public String getBirthPlace() {
        return birthPlace;
    }

    public void setBirthPlace(String birthPlace) {
        this.birthPlace = birthPlace;
    }

    public int getSex() {
        return sex;
    }

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

    public String getBirthWeight() {
        return birthWeight;
    }

    public void setBirthWeight(String birthWeight) {
        this.birthWeight = birthWeight;
    }

    public String getVeterinaryCode() {
        return veterinaryCode;
    }

    public void setVeterinaryCode(String veterinaryCode) {
        this.veterinaryCode = veterinaryCode;
    }

    public String getVeterinaryName() {
        return veterinaryName;
    }

    public void setVeterinaryName(String veterinaryName) {
        this.veterinaryName = veterinaryName;
    }

    public String getBirthNum() {
        return birthNum;
    }

    public void setBirthNum(String birthNum) {
        this.birthNum = birthNum;
    }

    public int getIsTwins() {
        return isTwins;
    }

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

    public String getEweEpc() {
        return eweEpc;
    }

    public void setEweEpc(String eweEpc) {
        this.eweEpc = eweEpc;
    }

    public String getRamEpc() {
        return RamEpc;
    }

    public void setRamEpc(String ramEpc) {
        RamEpc = ramEpc;
    }

    public String getRemark() {
        return remark;
    }

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

    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 int getStatus() {
        return status;
    }

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

    public String getIsLegalStatus() {
        return isLegalStatus;
    }

    public void setIsLegalStatus(String isLegalStatus) {
        this.isLegalStatus = isLegalStatus;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }
}
