package com.ruoyi.notification.domain;

import java.util.Date;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
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_log
 * 
 * @author ruoyi
 * @date 2025-12-17
 */
public class NotificationLog extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 日志ID */
    private Long logId;

    /** 通知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 sendStatus;

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

    /** 投递时间 */
    @Excel(name = "投递时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date deliveryTime;

    /** 重试次数 */
    @Excel(name = "重试次数")
    @Min(value = 0, message = "重试次数不能为负数")
    private Integer retryCount;

    /** 最大重试次数 */
    @Excel(name = "最大重试次数")
    @Min(value = 1, message = "最大重试次数不能小于1")
    @Max(value = 10, message = "最大重试次数不能超过10")
    private Integer maxRetryCount;

    /** 错误信息 */
    @Excel(name = "错误信息")
    @Size(max = 1000, message = "错误信息长度不能超过1000个字符")
    private String errorMessage;

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

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

    public void setLogId(Long logId) 
    {
        this.logId = logId;
    }

    public Long getLogId() 
    {
        return logId;
    }
    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 setSendStatus(String sendStatus) 
    {
        this.sendStatus = sendStatus;
    }

    public String getSendStatus() 
    {
        return sendStatus;
    }
    public void setSendTime(Date sendTime) 
    {
        this.sendTime = sendTime;
    }

    public Date getSendTime() 
    {
        return sendTime;
    }
    public void setDeliveryTime(Date deliveryTime) 
    {
        this.deliveryTime = deliveryTime;
    }

    public Date getDeliveryTime() 
    {
        return deliveryTime;
    }
    public void setRetryCount(Integer retryCount) 
    {
        this.retryCount = retryCount;
    }

    public Integer getRetryCount() 
    {
        return retryCount;
    }
    public void setMaxRetryCount(Integer maxRetryCount) 
    {
        this.maxRetryCount = maxRetryCount;
    }

    public Integer getMaxRetryCount() 
    {
        return maxRetryCount;
    }
    public void setErrorMessage(String errorMessage) 
    {
        this.errorMessage = errorMessage;
    }

    public String getErrorMessage() 
    {
        return errorMessage;
    }
    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;
    }

    @Override
    public String toString() {
        return "NotificationLog{" +
                "logId=" + logId +
                ", notificationId='" + notificationId + '\'' +
                ", templateId=" + templateId +
                ", recipientType='" + recipientType + '\'' +
                ", recipientId='" + recipientId + '\'' +
                ", recipientAddress='" + recipientAddress + '\'' +
                ", notificationType='" + notificationType + '\'' +
                ", notificationChannel='" + notificationChannel + '\'' +
                ", subject='" + subject + '\'' +
                ", content='" + content + '\'' +
                ", priority='" + priority + '\'' +
                ", sendStatus='" + sendStatus + '\'' +
                ", sendTime=" + sendTime +
                ", deliveryTime=" + deliveryTime +
                ", retryCount=" + retryCount +
                ", maxRetryCount=" + maxRetryCount +
                ", errorMessage='" + errorMessage + '\'' +
                ", businessType='" + businessType + '\'' +
                ", businessId='" + businessId + '\'' +
                '}';
    }
}