paiban/NPP.SmartSchedue.Api.Contracts/Services/Notification/Input/SendSystemMessageWithActionsInput.cs
Asoka.Wang 2b3f9acdce 123
2025-09-22 19:09:47 +08:00

54 lines
1.7 KiB
C#

using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using NPP.SmartSchedue.Api.Contracts.Core.Enums;
using NPP.SmartSchedue.Api.Contracts.Services.Notification.Output;
namespace NPP.SmartSchedue.Api.Contracts.Services.Notification.Input;
/// <summary>
/// 发送带操作按钮的系统消息输入模型
/// </summary>
public class SendSystemMessageWithActionsInput
{
/// <summary>
/// 接收人员ID
/// </summary>
[Required(ErrorMessage = "接收人员ID不能为空")]
[Range(1, long.MaxValue, ErrorMessage = "接收人员ID必须大于0")]
public long RecipientPersonnelId { 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 List<SystemMessageAction> Actions { get; set; } = new List<SystemMessageAction>();
/// <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; }
}