package com.njcn.rdms.module.system.api.notify.dto;

import com.njcn.rdms.module.system.enums.notify.NotifyMessageLevelConstants;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Map;

/**
 * 发送单条站内信 Request DTO（跨模块统一入口入参）。
 *
 * @author hongawen
 */
@Schema(description = "RPC 服务 - 发送单条站内信 Request DTO")
@Data
@Accessors(chain = true)
public class NotifySingleSendReqDTO {

    @Schema(description = "接收用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
    @NotNull(message = "接收用户编号不能为空")
    private Long userId;

    @Schema(description = "站内信模板编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "task_assigned")
    @NotNull(message = "模板编码不能为空")
    private String templateCode;

    @Schema(description = "模板参数（占位符 -> 值）", example = "{\"taskName\":\"联调\"}")
    private Map<String, Object> templateParams;

    @Schema(description = "消息等级：1普通/2提醒/3警告/4严重，默认普通", example = "1")
    private Integer level = NotifyMessageLevelConstants.NORMAL;

}
