First Commit
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using ADS.Apis.Gps.Application.Dtos.Auth;
|
||||
|
||||
namespace ADS.Apis.Gps.Application.Contracts.Auth;
|
||||
|
||||
public interface ISicrepAuthService
|
||||
{
|
||||
Task<SicrepAuthResponse> CreateTokenAsync(SicrepAuthRequest request, string? ip, string? mac, string? grupoEmpresa, CancellationToken ct = default);
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
namespace ADS.Apis.Gps.Contracts.Common;
|
||||
|
||||
public sealed class ApiResponse<T>
|
||||
{
|
||||
public int CountRecords { get; init; }
|
||||
public int StatusCode { get; init; }
|
||||
public string StatusCodeText { get; init; } = string.Empty;
|
||||
|
||||
public string? ConsoleMessage { get; init; } // mensaje consola
|
||||
public UiMessage? ScreenMessage { get; init; } // mensaje pantalla
|
||||
|
||||
public T? Value { get; init; }
|
||||
}
|
||||
|
||||
public sealed class UiMessage
|
||||
{
|
||||
public int MessageType { get; init; } // tipoMensaje
|
||||
public string Message { get; init; } = ""; // mensaje
|
||||
public int MessageCode { get; init; } // codigoMsg
|
||||
}
|
||||
11
Apis/ADS.Apis.Gps/Application/Contracts/Common/PagedQuery.cs
Normal file
11
Apis/ADS.Apis.Gps/Application/Contracts/Common/PagedQuery.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace ADS.Apis.Gps.Contracts.Common;
|
||||
|
||||
public sealed class PagedQuery
|
||||
{
|
||||
public string? Search { get; init; }
|
||||
public int Page { get; init; } = 1;
|
||||
public int PageSize { get; init; } = 50;
|
||||
|
||||
// Si Pagination=false, tu servicio puede ignorar Page/PageSize y devolver todo (o un límite fijo).
|
||||
public bool Pagination { get; init; } = true;
|
||||
}
|
||||
12
Apis/ADS.Apis.Gps/Application/Contracts/Common/RequestOf.cs
Normal file
12
Apis/ADS.Apis.Gps/Application/Contracts/Common/RequestOf.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
namespace ADS.Apis.Gps.Contracts.Common;
|
||||
|
||||
public sealed class RequestOf<T>
|
||||
{
|
||||
public T? Value { get; init; }
|
||||
|
||||
// Si también quieres paginación en algunos body requests:
|
||||
public string? Search { get; init; }
|
||||
public int Page { get; init; } = 1;
|
||||
public int PageSize { get; init; } = 50;
|
||||
public bool Pagination { get; init; } = true;
|
||||
}
|
||||
Reference in New Issue
Block a user