package com.yonge.cooleshow.biz.dal.dto;

import io.rong.messages.BaseMessage;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.StringUtils;

public class ImNetworkCustomMessage extends BaseMessage {
    @ApiModelProperty(value = "节拍器开关",required = true)
    private boolean enable;

    @ApiModelProperty(value = "消息类型(移动端定义，具体的类型不太清楚)",required = true)
    private int customType;

    @ApiModelProperty(value = "速度",required = true)
    private int rate;

    @ApiModelProperty(value = "音量",required = true)
    private int playVolume;

    @ApiModelProperty(value = "学员编号列表，都还分割",required = true)
    private String userId;

    @ApiModelProperty(value = "房间号（课程编号）",required = true)
    private Long roomId;

    public Long getRoomId() {
        return roomId;
    }

    public void setRoomId(Long roomId) {
        this.roomId = roomId;
    }

    public int getPlayVolume() {
        return playVolume;
    }

    public void setPlayVolume(int playVolume) {
        this.playVolume = playVolume;
    }

    public Boolean getEnable() {
        return enable;
    }

    public void setEnable(Boolean enable) {
        this.enable = enable;
    }

    public int getCustomType() {
        return customType;
    }

    public void setCustomType(int customType) {
        this.customType = customType;
    }

    public int getRate() {
        return rate;
    }

    public void setRate(int rate) {
        this.rate = rate;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    @Override
    public String getType() {
        return "DY:PlayMidiMessage";
    }

    @Override
    public String toString() {
        return "{\"enable\":" + enable +
                ", \"customType\":" + customType +
                ", \"rate\":" + rate +
                ", \"playVolume\":" + playVolume +
                ", \"userId\":" + (StringUtils.isEmpty(userId)?"\"\"":"\"" + userId + "\"") +
                '}';
    }
}
