using System.ComponentModel.DataAnnotations;
using NPP.SmartSchedue.Api.Contracts.Core.Enums;

namespace NPP.SmartSchedue.Api.Contracts.Services.Notification.Input;

/// <summary>
/// 发送系统消息输入模型
/// </summary>
public class SendSystemMessageInput
{
    /// <summary>
    /// 接收人员ID
    /// </summary>
    [Required(ErrorMessage = "接收人员ID不能为空")]
    [Range(1, long.MaxValue, ErrorMessage = "接收人员ID必须大于0")]
    public long RecipientPersonnelId { get; set; }
    
    public long NotificationSettingId { get; set; }
    
    /// <summary>
    /// 消息标题
    /// </summary>
    [Required(ErrorMessage = "消息标题不能为空")]
    [StringLength(200, ErrorMessage = "消息标题长度不能超过200个字符")]
    public string Title { get; set; } = "";

    /// <summary>
    /// 消息内容
    /// </summary>
    [Required(ErrorMessage = "消息内容不能为空")]
    [StringLength(4000, ErrorMessage = "消息内容长度不能超过4000个字符")]
    public string Content { get; set; } = "";

    /// <summary>
    /// 消息类型
    /// </summary>
    public SystemMessageTypeEnum MessageType { get; set; } = SystemMessageTypeEnum.Info;

    /// <summary>
    /// 业务类型
    /// </summary>
    [StringLength(100, ErrorMessage = "业务类型长度不能超过100个字符")]
    public string BusinessType { get; set; } = "";

    /// <summary>
    /// 业务ID
    /// </summary>
    public long? BusinessId { get; set; }
}