mirror of
https://github.com/meysamhadeli/booking-microservices.git
synced 2026-04-12 11:32:10 +08:00
22 lines
540 B
C#
22 lines
540 B
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Net;
|
|
using System.Text.Json;
|
|
using FluentValidation.Results;
|
|
|
|
namespace BuildingBlocks.Validation
|
|
{
|
|
public class ValidationResultModel
|
|
{
|
|
public int StatusCode { get; set; } = (int)HttpStatusCode.BadRequest;
|
|
public string Message { get; set; } = "Validation Failed.";
|
|
|
|
public List<ValidationFailure> Errors { get; set; }
|
|
|
|
public override string ToString()
|
|
{
|
|
return JsonSerializer.Serialize(this);
|
|
}
|
|
}
|
|
}
|