package com.phlx.wool.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 org.greenrobot.greendao.annotation.Generated;

@Entity
public class CacheLabel extends BaseObservable implements Parcelable {

    @Id(autoincrement = false)
    private String epc;

    private String tid;

    public CacheLabel() {
    }

    protected CacheLabel(Parcel in) {
        epc = in.readString();
        tid = in.readString();
    }

    @Generated(hash = 709708457)
    public CacheLabel(String epc, String tid) {
        this.epc = epc;
        this.tid = tid;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(epc);
        dest.writeString(tid);
    }

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

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

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

    public String getEpc() {
        return epc;
    }

    public void setEpc(String epc) {
        this.epc = epc;
    }

    public String getTid() {
        return tid;
    }

    public void setTid(String tid) {
        this.tid = tid;
    }
}
