You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
713 B
30 lines
713 B
3 months ago
|
using FluentValidation;
|
||
|
using System.Collections.Generic;
|
||
|
|
||
|
namespace Kean.Domain.Message.Commands
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 删除命令
|
||
|
/// </summary>
|
||
|
public class DeleteMessageCommand : CommandValidator<DeleteMessageCommand>, ICommand
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 用户 ID
|
||
|
/// </summary>
|
||
|
public int UserId { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 消息 ID
|
||
|
/// </summary>
|
||
|
public IEnumerable<int> MessageId { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 验证项
|
||
|
/// </summary>
|
||
|
protected override void Validation()
|
||
|
{
|
||
|
RuleFor(r => r.MessageId).NotEmpty().WithMessage("消息 ID 不合法");
|
||
|
}
|
||
|
}
|
||
|
}
|