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

15 lines
566 B
C#

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));
}
}
}