zeroframework/Services/DeviceCenter/ZeroFramework.DeviceCenter.Application/Validations/Ordering/IdentifiedCommandValidator.cs

16 lines
595 B
C#
Raw Normal View History

2023-12-05 09:22:48 +00:00
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);
}
}
}