zeroframework/Services/DeviceCenter/ZeroFramework.DeviceCenter.Application/Validations/Ordering/IdentifiedCommandValidator.cs
2023-12-05 17:22:48 +08:00

16 lines
595 B
C#

using FluentValidation;
using Microsoft.Extensions.Logging;
using ZeroFramework.DeviceCenter.Application.Commands.Ordering;
using ZeroFramework.DeviceCenter.Application.Infrastructure;
namespace ZeroFramework.DeviceCenter.Application.Validations.Ordering
{
public class IdentifiedCommandValidator : AbstractValidator<IdentifiedCommand<CancelOrderCommand, bool>>
{
public IdentifiedCommandValidator(ILogger<IdentifiedCommandValidator> logger)
{
RuleFor(command => command.Id).NotEmpty();
logger.LogInformation(GetType().Name);
}
}
}