16 lines
420 B
C#
16 lines
420 B
C#
using FluentValidation;
|
|
using IM.Application.Chat.Queries;
|
|
|
|
namespace IM.Application.Chat.Validators;
|
|
|
|
/// <summary>
|
|
/// 会话列表查询校验器。校验用户 ID 非空。
|
|
/// </summary>
|
|
public class GetConversationsQueryValidator : AbstractValidator<GetConversationsQuery>
|
|
{
|
|
public GetConversationsQueryValidator()
|
|
{
|
|
RuleFor(x => x.UserId).NotEmpty().WithMessage("用户 ID 不能为空");
|
|
}
|
|
}
|