package com.phlx.anchorcollect_p.entity;

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

import androidx.annotation.NonNull;
import androidx.databinding.BaseObservable;

public class InspectEntity extends BaseObservable implements Parcelable {

    String unid;

    /**
     * 1 电子耳标重复
     * 2 可视耳标重复
     * 3 全部重复
     */
    int type;

    public InspectEntity() {
    }

    protected InspectEntity(Parcel in) {
        unid = in.readString();
        type = in.readInt();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(unid);
        dest.writeInt(type);
    }

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

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

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

    public String getUnid() {
        return unid;
    }

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

    public int getType() {
        return type;
    }

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

    @NonNull
    @Override
    public String toString() {
        return "InspectEntity{" +
                "unid='" + unid + '\'' +
                ", type=" + type +
                '}';
    }
}
