LiveProgramBean.java 5.48 KB
package com.cnlive.goldenline.ui.model;

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

import java.io.Serializable;

/**
 * Description:直播节目
 * Created on 2017/2/24
 * Author : 萧
 */

public class LiveProgramBean implements Serializable, Parcelable {

    private String url;

    private int videoType;

    /**
     * 1 直播 2 回放
     */
    private int videoTag;

    private String title;

    private String des;

    private int online;

    /**
     * 1 不显示 间隔线
     */
    private int tag;

    private String time;

    private boolean isBuyTicket;

    private Integer ticketPrice;

    private TheaterInfoBean theaterInfoBean;

    public LiveProgramBean() {
    }

    public LiveProgramBean(String url, int videoType, int videoTag, String title, String des, int online) {
        this.url = url;
        this.videoType = videoType;
        this.videoTag = videoTag;
        this.title = title;
        this.des = des;
        this.online = online;
    }

    public LiveProgramBean(String url, int videoType, int videoTag, String title, String des, int online, int tag, String time, boolean isBuyTicket, Integer ticketPrice) {
        this.url = url;
        this.videoType = videoType;
        this.videoTag = videoTag;
        this.title = title;
        this.des = des;
        this.online = online;
        this.tag = tag;
        this.time = time;
        this.isBuyTicket = isBuyTicket;
        this.ticketPrice = ticketPrice;
    }

    public LiveProgramBean(String url, int videoType, int videoTag, String title, String des, int online, int tag, String time, boolean isBuyTicket, Integer ticketPrice, TheaterInfoBean theaterInfoBean) {
        this.url = url;
        this.videoType = videoType;
        this.videoTag = videoTag;
        this.title = title;
        this.des = des;
        this.online = online;
        this.tag = tag;
        this.time = time;
        this.isBuyTicket = isBuyTicket;
        this.ticketPrice = ticketPrice;
        this.theaterInfoBean = theaterInfoBean;
    }

    public TheaterInfoBean getTheaterInfoBean() {
        return theaterInfoBean;
    }

    public void setTheaterInfoBean(TheaterInfoBean theaterInfoBean) {
        this.theaterInfoBean = theaterInfoBean;
    }

    public boolean isBuyTicket() {
        return isBuyTicket;
    }

    public void setBuyTicket(boolean buyTicket) {
        isBuyTicket = buyTicket;
    }

    public Integer getTicketPrice() {
        return ticketPrice;
    }

    public void setTicketPrice(Integer ticketPrice) {
        this.ticketPrice = ticketPrice;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public int getVideoType() {
        return videoType;
    }

    public void setVideoType(int videoType) {
        this.videoType = videoType;
    }

    public int getVideoTag() {
        return videoTag;
    }

    public void setVideoTag(int videoTag) {
        this.videoTag = videoTag;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDes() {
        return des;
    }

    public void setDes(String des) {
        this.des = des;
    }

    public int getOnline() {
        return online;
    }

    public void setOnline(int online) {
        this.online = online;
    }

    public int getTag() {
        return tag;
    }

    public void setTag(int tag) {
        this.tag = tag;
    }

    @Override
    public String toString() {
        return "LiveProgramBean{" +
                "url='" + url + '\'' +
                ", videoType=" + videoType +
                ", videoTag=" + videoTag +
                ", title='" + title + '\'' +
                ", des='" + des + '\'' +
                ", online=" + online +
                ", tag=" + tag +
                ", time='" + time + '\'' +
                ", isBuyTicket=" + isBuyTicket +
                ", ticketPrice=" + ticketPrice +
                '}';
    }

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

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.url);
        dest.writeInt(this.videoType);
        dest.writeInt(this.videoTag);
        dest.writeString(this.title);
        dest.writeString(this.des);
        dest.writeInt(this.online);
        dest.writeInt(this.tag);
        dest.writeString(this.time);
        dest.writeByte(this.isBuyTicket ? (byte) 1 : (byte) 0);
        dest.writeValue(this.ticketPrice);
    }

    protected LiveProgramBean(Parcel in) {
        this.url = in.readString();
        this.videoType = in.readInt();
        this.videoTag = in.readInt();
        this.title = in.readString();
        this.des = in.readString();
        this.online = in.readInt();
        this.tag = in.readInt();
        this.time = in.readString();
        this.isBuyTicket = in.readByte() != 0;
        this.ticketPrice = (Integer) in.readValue(Integer.class.getClassLoader());
    }

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

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