2024-07-04 11:02:45 +05:00
|
|
|
using AsbCloudApp.Data;
|
2024-02-27 09:32:08 +05:00
|
|
|
using Refit;
|
|
|
|
|
|
|
|
namespace AsbCloudWebApi.IntegrationTests.Clients;
|
|
|
|
|
|
|
|
public interface ICrudWellRelatedClient<TDto>
|
|
|
|
where TDto : IId, IWellRelated
|
|
|
|
{
|
|
|
|
[Post("/")]
|
|
|
|
Task<IApiResponse<int>> InsertAsync([Body] TDto dto);
|
|
|
|
|
|
|
|
[Post("/range")]
|
|
|
|
Task<IApiResponse<int>> InsertRangeAsync([Body] IEnumerable<TDto> dtos);
|
|
|
|
|
|
|
|
[Get("/")]
|
|
|
|
Task<IApiResponse<IEnumerable<TDto>>> GetAllAsync();
|
|
|
|
|
|
|
|
[Get("/well/{idWell}")]
|
|
|
|
Task<IApiResponse<IEnumerable<TDto>>> GetByIdWellAsync(int idWell);
|
|
|
|
|
|
|
|
[Get("/{id}")]
|
|
|
|
Task<IApiResponse<TDto>> GetOrDefaultAsync(int id);
|
|
|
|
|
|
|
|
[Put("/")]
|
|
|
|
Task<IApiResponse<int>> UpdateAsync([Body] TDto dto);
|
|
|
|
|
|
|
|
[Delete("/{id}")]
|
|
|
|
Task<IApiResponse<int>> DeleteAsync(int id);
|
|
|
|
}
|