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

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

//节拍器消息
public class ImNetworkMetronomeMessage extends BaseMessage {
    private ImNetworkCustomMessage content;

    private static final transient String TYPE = "DY:PlayMidiMessage";

    public ImNetworkMetronomeMessage(ImNetworkCustomMessage content) {
        this.content = content;
    }

    public ImNetworkCustomMessage getContent() {
        return content;
    }

    public void setContent(ImNetworkCustomMessage content) {
        this.content = content;
    }

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

    @Override
    public String getObjectName() {
        return TYPE;
    }
}
