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

import com.yonge.cooleshow.biz.dal.entity.BaseMessage;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

//节拍器消息
@Data
public class ImNetworkMetronomeMessage extends BaseMessage {
    private Boolean enable;
    private int customType;
    private int rate;
    private int playVolume;
    private String userId;

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

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