using FluentValidation; using SJZY.Track.Domain.Dtos.Forewarning; namespace SJZY.Track.Application.Validations.Forewarning; public class RuleTrackStateDtoValidator : AbstractValidator { public RuleTrackStateDtoValidator() { RuleFor(x => x.StartTrackStatusId).GreaterThan(0).WithMessage("起始轨迹状态id必须大于0"); RuleFor(x => x.EndTrackStatusId).GreaterThan(0).WithMessage("终止轨迹状态id必须大于0"); RuleFor(x => x.NotifyUserId).NotEmpty().WithMessage("通知对象不能为空"); } }