40 lines
1.1 KiB
C#
40 lines
1.1 KiB
C#
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace NPP.SmartSchedue.Api.Contracts.Services.Notification.Input;
|
|
|
|
/// <summary>
|
|
/// 发送邮件输入
|
|
/// </summary>
|
|
public class SendEmailInput
|
|
{
|
|
/// <summary>
|
|
/// 接收人邮箱
|
|
/// </summary>
|
|
[Required(ErrorMessage = "接收人邮箱不能为空")]
|
|
[EmailAddress(ErrorMessage = "邮箱地址格式无效")]
|
|
public string RecipientEmail { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// 邮件主题
|
|
/// </summary>
|
|
[Required(ErrorMessage = "邮件主题不能为空")]
|
|
[MaxLength(500, ErrorMessage = "邮件主题长度不能超过500个字符")]
|
|
public string Subject { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// 邮件内容
|
|
/// </summary>
|
|
[Required(ErrorMessage = "邮件内容不能为空")]
|
|
public string Content { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// 是否HTML格式
|
|
/// </summary>
|
|
public bool IsHtml { get; set; } = true;
|
|
|
|
/// <summary>
|
|
/// 附件文件路径列表
|
|
/// </summary>
|
|
public List<string>? Attachments { get; set; }
|
|
} |