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.
34 lines
819 B
34 lines
819 B
using FluentValidation;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Kean.Domain.Message.Commands
|
|
{
|
|
/// <summary>
|
|
/// 标记命令
|
|
/// </summary>
|
|
public class MarkMessageCommand : CommandValidator<MarkMessageCommand>, ICommand
|
|
{
|
|
/// <summary>
|
|
/// 用户 ID
|
|
/// </summary>
|
|
public int UserId { get; set; }
|
|
|
|
/// <summary>
|
|
/// 消息 ID
|
|
/// </summary>
|
|
public IEnumerable<int> MessageId { get; set; }
|
|
|
|
/// <summary>
|
|
/// 状态标记
|
|
/// </summary>
|
|
public bool Flag { get; set; }
|
|
|
|
/// <summary>
|
|
/// 验证项
|
|
/// </summary>
|
|
protected override void Validation()
|
|
{
|
|
RuleFor(r => r.MessageId).NotEmpty().WithMessage("消息 ID 不合法");
|
|
}
|
|
}
|
|
}
|