This commit is contained in:
2025-04-06 13:07:41 +04:00
parent f90274ff5e
commit e561eb91d3
7 changed files with 49 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
using CatHasPawsContratcs.BusinessLogicsContracts;
namespace CatHasPawsBusinessLogic.Implementations;
internal class ReportContract : IReportContract
{
}

View File

@@ -0,0 +1,5 @@
namespace CatHasPawsContratcs.AdapterContracts;
public interface IReportAdapter
{
}

View File

@@ -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);
}

View File

@@ -0,0 +1,5 @@
namespace CatHasPawsContratcs.BusinessLogicsContracts;
public interface IReportContract
{
}

View File

@@ -0,0 +1,7 @@
using CatHasPawsContratcs.AdapterContracts;
namespace CatHasPawsWebApi.Adapters;
public class ReportAdapter : IReportAdapter
{
}

View File

@@ -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;
}

View File

@@ -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();