package com.platform.enums;

/**
 * @author abnerhou
 * @date 2020/9/24 16:43
 * @desciption
 */
public enum  LiveRoomStatusEnum {

    //直播间状态。101：直播中，102：未开始，103已结束，104禁播，105：暂停，106：异常，107：已过期
    NOT_START(102 , "未开始"),
    LIVING_ING(101 , "直播中"),
    LIVE_FINISH(103 , "已结束"),
    LIVE_STOP(105 , "暂停"),
    LIVE_ERROR(106 , "异常"),
    LIVE_GONE(107 , "已过期"),
    ;

    private Integer status;
    private String desc;

    LiveRoomStatusEnum(Integer status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    public static LiveRoomStatusEnum getByStatus(int status){
        for (LiveRoomStatusEnum statusEnum : values()){
            if(statusEnum.getStatus() == status){
                return statusEnum;
            }
        }
        return NOT_START;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
