package com.phlx.anchorcollect_p.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;

/**
 * 冻精bean
 */
@Entity
public class FrozenSemenEntity extends BaseObservable implements Parcelable {
    
    /** 主键 */
    @Id(autoincrement = false)
    private Long id;

    /** 注册号 */
    private String code;

    /** 父本 */
    private String fuCode;

    /** 母本 */
    private String muCode;

    /** 祖父 */
    private String zfCode;

    /** 祖母 */
    private String zmCode;

    /** 外祖父 */
    private String wzfCode;

    /** 外祖母 */
    private String wzmCode;

    /** 照片 */
    private String img;

    /** 冻精信息 */
    private String info;

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

    public FrozenSemenEntity() {
    }

    protected FrozenSemenEntity(Parcel in) {
        if (in.readByte() == 0) {
            id = null;
        } else {
            id = in.readLong();
        }
        code = in.readString();
        fuCode = in.readString();
        muCode = in.readString();
        zfCode = in.readString();
        zmCode = in.readString();
        wzfCode = in.readString();
        wzmCode = in.readString();
        img = in.readString();
        info = in.readString();
        if (in.readByte() == 0) {
            deptId = null;
        } else {
            deptId = in.readLong();
        }
    }

    @Generated(hash = 1187217824)
    public FrozenSemenEntity(Long id, String code, String fuCode, String muCode, String zfCode,
            String zmCode, String wzfCode, String wzmCode, String img, String info, Long deptId) {
        this.id = id;
        this.code = code;
        this.fuCode = fuCode;
        this.muCode = muCode;
        this.zfCode = zfCode;
        this.zmCode = zmCode;
        this.wzfCode = wzfCode;
        this.wzmCode = wzmCode;
        this.img = img;
        this.info = info;
        this.deptId = deptId;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        if (id == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeLong(id);
        }
        dest.writeString(code);
        dest.writeString(fuCode);
        dest.writeString(muCode);
        dest.writeString(zfCode);
        dest.writeString(zmCode);
        dest.writeString(wzfCode);
        dest.writeString(wzmCode);
        dest.writeString(img);
        dest.writeString(info);
        if (deptId == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeLong(deptId);
        }
    }

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

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

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

    public Long getId() {
        return id;
    }

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

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getFuCode() {
        return fuCode;
    }

    public void setFuCode(String fuCode) {
        this.fuCode = fuCode;
    }

    public String getMuCode() {
        return muCode;
    }

    public void setMuCode(String muCode) {
        this.muCode = muCode;
    }

    public String getZfCode() {
        return zfCode;
    }

    public void setZfCode(String zfCode) {
        this.zfCode = zfCode;
    }

    public String getZmCode() {
        return zmCode;
    }

    public void setZmCode(String zmCode) {
        this.zmCode = zmCode;
    }

    public String getWzfCode() {
        return wzfCode;
    }

    public void setWzfCode(String wzfCode) {
        this.wzfCode = wzfCode;
    }

    public String getWzmCode() {
        return wzmCode;
    }

    public void setWzmCode(String wzmCode) {
        this.wzmCode = wzmCode;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public Long getDeptId() {
        return deptId;
    }

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

    @Override
    public String toString() {
        return "FrozenSemenEntity{" +
                "id=" + id +
                ", code='" + code + '\'' +
                ", fuCode='" + fuCode + '\'' +
                ", muCode='" + muCode + '\'' +
                ", zfCode='" + zfCode + '\'' +
                ", zmCode='" + zmCode + '\'' +
                ", wzfCode='" + wzfCode + '\'' +
                ", wzmCode='" + wzmCode + '\'' +
                ", img='" + img + '\'' +
                ", info='" + info + '\'' +
                ", deptId=" + deptId +
                '}';
    }
}
