package com.cooleshow.student.bean;

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

/**
 * Author by pq, Date on 2022/3/29.
 */
public class LiveRoomInfoBean implements Parcelable {

    /**
     * createdByName :
     * id : 0
     * imToken :
     * likeNum : 0
     * liveRemark :
     * liveStartTime :
     * liveState : 0
     * lookNum : 0
     * os :
     * preTemplate :
     * roomConfig :
     * roomState : 0
     * roomTitle :
     * roomUid :
     * speakerId : 0
     * speakerName :
     * speakerPic :
     * tenantId : 0
     * tenantLogo :
     * tenantName :
     * totalLookNum : 0
     */

    public String createdByName;
    public int id;
    public String imToken;
    public int likeNum;
    public String liveRemark;
    public String liveStartTime;
    public int liveState;
    public int lookNum;
    public String os;
    public String preTemplate;
    public String roomConfig;
    public int roomState;
    public String roomTitle;
    public String roomUid;
    public String speakerId;
    public String speakerName;
    public String speakerPic;
    public int tenantId;
    public String tenantLogo;
    public String tenantName;
    public int totalLookNum;
    public int blacklistFlag;//当前登录人是否是黑名单用户 0否 1是

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

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.createdByName);
        dest.writeInt(this.id);
        dest.writeString(this.imToken);
        dest.writeInt(this.likeNum);
        dest.writeString(this.liveRemark);
        dest.writeString(this.liveStartTime);
        dest.writeInt(this.liveState);
        dest.writeInt(this.lookNum);
        dest.writeString(this.os);
        dest.writeString(this.preTemplate);
        dest.writeString(this.roomConfig);
        dest.writeInt(this.roomState);
        dest.writeString(this.roomTitle);
        dest.writeString(this.roomUid);
        dest.writeString(this.speakerId);
        dest.writeString(this.speakerName);
        dest.writeString(this.speakerPic);
        dest.writeInt(this.tenantId);
        dest.writeString(this.tenantLogo);
        dest.writeString(this.tenantName);
        dest.writeInt(this.totalLookNum);
        dest.writeInt(this.blacklistFlag);
    }

    public void readFromParcel(Parcel source) {
        this.createdByName = source.readString();
        this.id = source.readInt();
        this.imToken = source.readString();
        this.likeNum = source.readInt();
        this.liveRemark = source.readString();
        this.liveStartTime = source.readString();
        this.liveState = source.readInt();
        this.lookNum = source.readInt();
        this.os = source.readString();
        this.preTemplate = source.readString();
        this.roomConfig = source.readString();
        this.roomState = source.readInt();
        this.roomTitle = source.readString();
        this.roomUid = source.readString();
        this.speakerId = source.readString();
        this.speakerName = source.readString();
        this.speakerPic = source.readString();
        this.tenantId = source.readInt();
        this.tenantLogo = source.readString();
        this.tenantName = source.readString();
        this.totalLookNum = source.readInt();
        this.blacklistFlag = source.readInt();
    }

    public LiveRoomInfoBean() {
    }

    protected LiveRoomInfoBean(Parcel in) {
        this.createdByName = in.readString();
        this.id = in.readInt();
        this.imToken = in.readString();
        this.likeNum = in.readInt();
        this.liveRemark = in.readString();
        this.liveStartTime = in.readString();
        this.liveState = in.readInt();
        this.lookNum = in.readInt();
        this.os = in.readString();
        this.preTemplate = in.readString();
        this.roomConfig = in.readString();
        this.roomState = in.readInt();
        this.roomTitle = in.readString();
        this.roomUid = in.readString();
        this.speakerId = in.readString();
        this.speakerName = in.readString();
        this.speakerPic = in.readString();
        this.tenantId = in.readInt();
        this.tenantLogo = in.readString();
        this.tenantName = in.readString();
        this.totalLookNum = in.readInt();
        this.blacklistFlag = in.readInt();
    }

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

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

    public String getRoomId(){
        return roomUid;
    }
}
