Some other func
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace WorkFlowCheck.BL.DTO
|
||||
{
|
||||
public class ApiResponseBaseDTO
|
||||
{
|
||||
public bool IsSuccess { get; set; }
|
||||
public IEnumerable<string> Errors { get; set; }
|
||||
public bool HandleError { get; set; }
|
||||
public string Error
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Errors == null || Errors.Count() == 0) return string.Empty;
|
||||
return string.Join(';', Errors);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class ApiResponseDTO : ApiResponseBaseDTO
|
||||
{
|
||||
public object Data { get; set; }
|
||||
}
|
||||
|
||||
public interface IApiResponseDTO<out T>
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class ApiResponseDTO<T> : ApiResponseBaseDTO, IApiResponseDTO<T>
|
||||
{
|
||||
public T Data { get; set; }
|
||||
}
|
||||
public class ApiResponseListDTO<T> : ApiResponseBaseDTO
|
||||
{
|
||||
public T[] Data { get; set; }
|
||||
public int Total { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace WorkFlowCheck.BL.DTO
|
||||
{
|
||||
[JsonSerializable(typeof(ResponseDTO))]
|
||||
public class ResponseDTO
|
||||
{
|
||||
public string Message { get; set; } = null!;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace WorkFlowCheck.BL.DTO
|
||||
{
|
||||
public class UserDTO
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; } = null!;
|
||||
public string Email { get; set; } = null!;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user