package com.ruoyi.notification.domain;

import java.util.Date;
import java.util.Map;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 通知消息对象 dc_notification_message
 * 
 * @author ruoyi
 * @date 2025-12-19
 */
public class NotificationMessage extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 消息ID */
    private Long messageId;

    /** 通知ID */
    @Excel(name = "通知ID")
    @NotBlank(message = "通知ID不能为空")
    @Size(max = 100, message = "通知ID长度不能超过100个字符")
    private String notificationId;

    /** 模板ID */
    @Excel(name = "模板ID")
    private Long templateId;

    /** 接收者类型 */
    @Excel(name = "接收者类型")
    @NotBlank(message = "接收者类型不能为空")
    @Size(max = 50, message = "接收者类型长度不能超过50个字符")
    private String recipientType;

    /** 接收者ID */
    @Excel(name = "接收者ID")
    @NotBlank(message = "接收者ID不能为空")
    @Size(max = 100, message = "接收者ID长度不能超过100个字符")
    private String recipientId;

    /** 接收地址 */
    @Excel(name = "接收地址")
    @NotBlank(message = "接收地址不能为空")
    @Size(max = 200, message = "接收地址长度不能超过200个字符")
    private String recipientAddress;

    /** 通知类型 */
    @Excel(name = "通知类型")
    @NotBlank(message = "通知类型不能为空")
    @Size(max = 50, message = "通知类型长度不能超过50个字符")
    private String notificationType;

    /** 通知渠道 */
    @Excel(name = "通知渠道")
    @NotBlank(message = "通知渠道不能为空")
    @Size(max = 50, message = "通知渠道长度不能超过50个字符")
    private String notificationChannel;

    /** 主题 */
    @Excel(name = "主题")
    @Size(max = 200, message = "主题长度不能超过200个字符")
    private String subject;

    /** 内容 */
    @Excel(name = "内容")
    @NotBlank(message = "内容不能为空")
    @Size(max = 2000, message = "内容长度不能超过2000个字符")
    private String content;

    /** 优先级 */
    @Excel(name = "优先级")
    @NotBlank(message = "优先级不能为空")
    @Size(max = 20, message = "优先级长度不能超过20个字符")
    private String priority;

    /** 消息状态 */
    @Excel(name = "消息状态")
    @NotBlank(message = "消息状态不能为空")
    @Size(max = 50, message = "消息状态长度不能超过50个字符")
    private String messageStatus;

    /** 计划发送时间 */
    @Excel(name = "计划发送时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date scheduledTime;

    /** 业务类型 */
    @Excel(name = "业务类型")
    @Size(max = 50, message = "业务类型长度不能超过50个字符")
    private String businessType;

    /** 业务ID */
    @Excel(name = "业务ID")
    @Size(max = 100, message = "业务ID长度不能超过100个字符")
    private String businessId;

    /** 模板参数 (JSON格式) */
    private String templateParams;

    /** 扩展属性 (JSON格式) */
    private String extendedProperties;

    // 非持久化字段，用于传递模板参数
    private transient Map<String, Object> parameterMap;

    public void setMessageId(Long messageId) 
    {
        this.messageId = messageId;
    }

    public Long getMessageId() 
    {
        return messageId;
    }
    public void setNotificationId(String notificationId) 
    {
        this.notificationId = notificationId;
    }

    public String getNotificationId() 
    {
        return notificationId;
    }
    public void setTemplateId(Long templateId) 
    {
        this.templateId = templateId;
    }

    public Long getTemplateId() 
    {
        return templateId;
    }
    public void setRecipientType(String recipientType) 
    {
        this.recipientType = recipientType;
    }

    public String getRecipientType() 
    {
        return recipientType;
    }
    public void setRecipientId(String recipientId) 
    {
        this.recipientId = recipientId;
    }

    public String getRecipientId() 
    {
        return recipientId;
    }
    public void setRecipientAddress(String recipientAddress) 
    {
        this.recipientAddress = recipientAddress;
    }

    public String getRecipientAddress() 
    {
        return recipientAddress;
    }
    public void setNotificationType(String notificationType) 
    {
        this.notificationType = notificationType;
    }

    public String getNotificationType() 
    {
        return notificationType;
    }
    public void setNotificationChannel(String notificationChannel) 
    {
        this.notificationChannel = notificationChannel;
    }

    public String getNotificationChannel() 
    {
        return notificationChannel;
    }
    public void setSubject(String subject) 
    {
        this.subject = subject;
    }

    public String getSubject() 
    {
        return subject;
    }
    public void setContent(String content) 
    {
        this.content = content;
    }

    public String getContent() 
    {
        return content;
    }
    public void setPriority(String priority) 
    {
        this.priority = priority;
    }

    public String getPriority() 
    {
        return priority;
    }
    public void setMessageStatus(String messageStatus) 
    {
        this.messageStatus = messageStatus;
    }

    public String getMessageStatus() 
    {
        return messageStatus;
    }
    public void setScheduledTime(Date scheduledTime) 
    {
        this.scheduledTime = scheduledTime;
    }

    public Date getScheduledTime() 
    {
        return scheduledTime;
    }
    public void setBusinessType(String businessType) 
    {
        this.businessType = businessType;
    }

    public String getBusinessType() 
    {
        return businessType;
    }
    public void setBusinessId(String businessId) 
    {
        this.businessId = businessId;
    }

    public String getBusinessId() 
    {
        return businessId;
    }
    public void setTemplateParams(String templateParams) 
    {
        this.templateParams = templateParams;
    }

    public String getTemplateParams() 
    {
        return templateParams;
    }
    public void setExtendedProperties(String extendedProperties) 
    {
        this.extendedProperties = extendedProperties;
    }

    public String getExtendedProperties() 
    {
        return extendedProperties;
    }
    public void setParameterMap(Map<String, Object> parameterMap) 
    {
        this.parameterMap = parameterMap;
    }

    public Map<String, Object> getParameterMap() 
    {
        return parameterMap;
    }

    @Override
    public String toString() {
        return "NotificationMessage{" +
                "messageId=" + messageId +
                ", notificationId='" + notificationId + '\'' +
                ", templateId=" + templateId +
                ", recipientType='" + recipientType + '\'' +
                ", recipientId='" + recipientId + '\'' +
                ", recipientAddress='" + recipientAddress + '\'' +
                ", notificationType='" + notificationType + '\'' +
                ", notificationChannel='" + notificationChannel + '\'' +
                ", subject='" + subject + '\'' +
                ", content='" + content + '\'' +
                ", priority='" + priority + '\'' +
                ", messageStatus='" + messageStatus + '\'' +
                ", scheduledTime=" + scheduledTime +
                ", businessType='" + businessType + '\'' +
                ", businessId='" + businessId + '\'' +
                ", templateParams='" + templateParams + '\'' +
                ", extendedProperties='" + extendedProperties + '\'' +
                '}';
    }
}