
- 新增通知系统完整架构,包含通知设置、历史记录、任务管理等核心功能 - 实现工作任务分配服务,支持人员和设备的智能分配 - 添加人员分组管理功能,支持灵活的通知目标配置 - 完善相关枚举定义和数据传输对象 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
83 lines
2.1 KiB
C#
83 lines
2.1 KiB
C#
using System.Collections.Generic;
|
||
using System.ComponentModel.DataAnnotations;
|
||
using NPP.SmartSchedue.Api.Contracts.Core.Enums;
|
||
|
||
namespace NPP.SmartSchedue.Api.Contracts.Services.Notification.Input;
|
||
|
||
/// <summary>
|
||
/// 发送通知输入
|
||
/// </summary>
|
||
public class SendNotificationInput
|
||
{
|
||
#region 基础信息
|
||
|
||
/// <summary>
|
||
/// 通知方式
|
||
/// </summary>
|
||
[Required(ErrorMessage = "通知方式不能为空")]
|
||
public NotificationTypeEnum NotificationType { get; set; }
|
||
|
||
/// <summary>
|
||
/// 通知标题
|
||
/// </summary>
|
||
[Required(ErrorMessage = "通知标题不能为空")]
|
||
[MaxLength(500, ErrorMessage = "通知标题长度不能超过500个字符")]
|
||
public string Title { get; set; } = "";
|
||
|
||
/// <summary>
|
||
/// 通知内容
|
||
/// </summary>
|
||
[Required(ErrorMessage = "通知内容不能为空")]
|
||
public string Content { get; set; } = "";
|
||
|
||
#endregion
|
||
|
||
#region 接收人信息
|
||
|
||
/// <summary>
|
||
/// 接收人员ID列表
|
||
/// </summary>
|
||
[Required(ErrorMessage = "接收人员不能为空")]
|
||
public List<long> RecipientPersonnelIds { get; set; } = new List<long>();
|
||
|
||
#endregion
|
||
|
||
#region 业务上下文
|
||
|
||
/// <summary>
|
||
/// 业务类型(如:工作任务、设备维护等)
|
||
/// </summary>
|
||
[MaxLength(100, ErrorMessage = "业务类型长度不能超过100个字符")]
|
||
public string BusinessType { get; set; } = "";
|
||
|
||
/// <summary>
|
||
/// 业务ID
|
||
/// </summary>
|
||
public long? BusinessId { get; set; }
|
||
|
||
/// <summary>
|
||
/// 业务数据(JSON格式存储相关业务信息)
|
||
/// </summary>
|
||
public string BusinessData { get; set; } = "";
|
||
|
||
#endregion
|
||
|
||
#region 发送配置
|
||
|
||
/// <summary>
|
||
/// 是否立即发送
|
||
/// </summary>
|
||
public bool SendImmediately { get; set; } = true;
|
||
|
||
/// <summary>
|
||
/// 计划发送时间(当SendImmediately为false时有效)
|
||
/// </summary>
|
||
public DateTime? PlannedSendTime { get; set; }
|
||
|
||
/// <summary>
|
||
/// 最大重试次数
|
||
/// </summary>
|
||
public int MaxRetryCount { get; set; } = 3;
|
||
|
||
#endregion
|
||
} |