21 lines
555 B
C#
21 lines
555 B
C#
using FluentValidation;
|
|
using InternshipSystem.Core.ValueObject;
|
|
using Microsoft.AspNetCore.Http;
|
|
|
|
namespace InternshipSystem.Api.Queries
|
|
{
|
|
public class DocumentPublishRequest
|
|
{
|
|
public long? Id { get; set; }
|
|
public string Description { get; set; }
|
|
public DocumentType Type { get; set; }
|
|
|
|
public class Validator : AbstractValidator<DocumentPublishRequest>
|
|
{
|
|
public Validator()
|
|
{
|
|
RuleFor(document => document.Type).NotEmpty();
|
|
}
|
|
}
|
|
}
|
|
} |