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

15 lines
566 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;
namespace ZeroFramework.DeviceCenter.Application.Validations.Ordering
{
public class CancelOrderCommandValidator : AbstractValidator<CancelOrderCommand>
{
public CancelOrderCommandValidator(ILogger<CancelOrderCommandValidator> logger)
{
RuleFor(order => order.OrderId).NotEmpty().WithMessage("No orderId found");
logger.LogInformation(nameof(CancelOrderCommandValidator));
}
}
}