using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using NPP.SmartSchedue.Api.Contracts.Core.Enums; namespace NPP.SmartSchedue.Api.Contracts.Services.Notification.Input; /// /// 发送通知输入 /// public class SendNotificationInput { #region 基础信息 /// /// 通知方式 /// [Required(ErrorMessage = "通知方式不能为空")] public NotificationTypeEnum NotificationType { get; set; } /// /// 通知标题 /// [Required(ErrorMessage = "通知标题不能为空")] [MaxLength(500, ErrorMessage = "通知标题长度不能超过500个字符")] public string Title { get; set; } = ""; /// /// 通知内容 /// [Required(ErrorMessage = "通知内容不能为空")] public string Content { get; set; } = ""; #endregion #region 接收人信息 /// /// 接收人员ID列表 /// [Required(ErrorMessage = "接收人员不能为空")] public List RecipientPersonnelIds { get; set; } = new List(); #endregion #region 业务上下文 /// /// 业务类型(如:工作任务、设备维护等) /// [MaxLength(100, ErrorMessage = "业务类型长度不能超过100个字符")] public string BusinessType { get; set; } = ""; /// /// 业务ID /// public long? BusinessId { get; set; } /// /// 业务数据(JSON格式存储相关业务信息) /// public string BusinessData { get; set; } = ""; #endregion #region 发送配置 /// /// 是否立即发送 /// public bool SendImmediately { get; set; } = true; /// /// 计划发送时间(当SendImmediately为false时有效) /// public DateTime? PlannedSendTime { get; set; } /// /// 最大重试次数 /// public int MaxRetryCount { get; set; } = 3; #endregion }