Prepare
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
using CatHasPawsContratcs.BusinessLogicsContracts;
|
||||
|
||||
namespace CatHasPawsBusinessLogic.Implementations;
|
||||
|
||||
internal class ReportContract : IReportContract
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
namespace CatHasPawsContratcs.AdapterContracts;
|
||||
|
||||
public interface IReportAdapter
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using CatHasPawsContratcs.Infrastructure;
|
||||
|
||||
namespace CatHasPawsContratcs.AdapterContracts.OperationResponses;
|
||||
|
||||
public class ReportOperationResponse : OperationResponse
|
||||
{
|
||||
|
||||
public static ReportOperationResponse BadRequest(string message) => BadRequest<ReportOperationResponse>(message);
|
||||
|
||||
public static ReportOperationResponse InternalServerError(string message) => InternalServerError<ReportOperationResponse>(message);
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
namespace CatHasPawsContratcs.BusinessLogicsContracts;
|
||||
|
||||
public interface IReportContract
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
using CatHasPawsContratcs.AdapterContracts;
|
||||
|
||||
namespace CatHasPawsWebApi.Adapters;
|
||||
|
||||
public class ReportAdapter : IReportAdapter
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using CatHasPawsContratcs.AdapterContracts;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace CatHasPawsWebApi.Controllers;
|
||||
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
public class ReportController(IReportAdapter reportAdapter) : ControllerBase
|
||||
{
|
||||
private IReportAdapter _reportAdapter = reportAdapter;
|
||||
}
|
||||
@@ -75,6 +75,9 @@ builder.Services.AddTransient<IProductAdapter, ProductAdapter>();
|
||||
builder.Services.AddTransient<ISaleAdapter, SaleAdapter>();
|
||||
builder.Services.AddTransient<IWorkerAdapter, WorkerAdapter>();
|
||||
|
||||
builder.Services.AddTransient<IReportContract, ReportContract>();
|
||||
builder.Services.AddTransient<IReportAdapter, ReportAdapter>();
|
||||
|
||||
|
||||
// Learn more about configuring OpenAPI at https://aka.ms/aspnet/openapi
|
||||
builder.Services.AddOpenApi();
|
||||
|
||||
Reference in New Issue
Block a user