package cn.axzo.msg.center.service.group.request;

import cn.axzo.msg.center.service.enums.MessageGroupNodeCategoryEnum;
import com.alibaba.fastjson.JSON;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @description
 *
 * @author cold_blade
 * @date 2023/9/26
 * @version 1.0
 */
@Setter
@Getter
public class MessageGroupNodeAddRequest implements Serializable {

    private static final long serialVersionUID = -6296122036443137951L;

    /**
     * 操作者的自然人id
     */
    @NotNull(message = "operatorId is required")
    private Long operatorId;
    /**
     * 父节点编码
     */
    private String parentNodeCode;
    /**
     * 待添加结点名称
     */
    @NotEmpty(message = "nodeName is required")
    private String nodeName;
    /**
     * 待添加结点类型
     *   GENERAL_MESSAGE_CENTER:  通知的业务中心
     *   GENERAL_MESSAGE_MODULE:  消息模块
     *   GENERAL_MESSAGE_CATEGORY:  消息分类
     *   PENDING_MESSAGE_CENTER:  待办的业务中心
     *   PENDING_MESSAGE_MODULE:  待办模块
     *   PENDING_MESSAGE_CATEGORY:  待办分类
     */
    @NotNull(message = "category is required")
    private MessageGroupNodeCategoryEnum category;
    /**
     * 待添加结点图标
     */
    private String icon;

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }
}
