package com.zxhl.cms.net.model.news;

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

import java.io.Serializable;

/**
 * Created by gaoleichao on 2018/5/6.
 */

public class TabEntity implements Serializable,Parcelable{
    public int id;
    public String name;
    public int redPacketNum;
    public boolean isSelect;
    public int tabType;
    public int type;
    public String channel;

    public TabEntity(int id, String name, int type) {
        this.id = id;
        this.name = name;
        this.tabType = type;
    }

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

    public void writeToParcel(Parcel out, int flags){
        out.writeInt(id);
        out.writeString(name);
        out.writeInt(type);
    }

    public static final Parcelable.Creator<TabEntity> CREATOR = new Parcelable.Creator<TabEntity>(){
        public TabEntity createFromParcel(Parcel in){
            return new TabEntity(in);
        }

        public TabEntity[] newArray(int size){
            return new TabEntity[size];
        }
    };

    private TabEntity(Parcel in){
        id = in.readInt();
        type = in.readInt();
        name = in.readString();
    }
}
