package cn.axzo.msg.center.push;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.slf4j.Logger;

/**
 * @author yanglin
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class PushData {

    private boolean switchOn;

    /**
     * 声音文件
     */
    private String voiceFile;

    /**
     * push类型：system（系统消息）、op(运营消息)
     */
    private String type;

    public boolean determinePushable(Logger log, String templateCode) {
        if (switchOn) return true;
        log.info("push开关未打开, templateCode={}", templateCode);
        return false;
    }

}