* Added new Entities and Dtos

* Mapping new classes
* Added new services and Controllers in API
This commit is contained in:
2025-08-07 06:46:43 +02:00
parent 1842fd6146
commit 6139ce97d7
18 changed files with 855 additions and 6 deletions

View File

@@ -0,0 +1,17 @@
using Microsoft.AspNetCore.Mvc;
using SytelineSaAppEfDataModel.Dtos;
using SytelineSaAppEfDataModel.Services;
namespace FaKrosnoApi.Controllers;
[ApiController]
[Route("api/[controller]")]
public class CustomerController(ICustomerService service) : Controller
{
[HttpGet]
public async Task<ActionResult<IEnumerable<CustomerDto>>> GetAllCustomers()
{
IList<CustomerDto> customers = await service.GetAllCustomers();
return Ok(customers);
}
}

View File

@@ -0,0 +1,17 @@
using Microsoft.AspNetCore.Mvc;
using SytelineSaAppEfDataModel.Dtos;
using SytelineSaAppEfDataModel.Services;
namespace FaKrosnoApi.Controllers;
[ApiController]
[Route("api/[controller]")]
public class CustomerTpController(ICustomerTpService service) : Controller
{
[HttpGet]
public async Task<ActionResult<IEnumerable<CustomerTpDto>>> GetAllCustomers()
{
IList<CustomerTpDto> customers = await service.GetAllCustomersTp();
return Ok(customers);
}
}

View File

@@ -0,0 +1,16 @@
using Microsoft.AspNetCore.Mvc;
using SytelineSaAppEfDataModel.Services;
namespace FaKrosnoApi.Controllers;
[ApiController]
[Route("api/[controller]")]
public class EdiCustomerOrderImportController(IEdiCustomerOrderImportService service) : Controller
{
[HttpGet("last-update-date")]
public async Task<ActionResult<DateTime>> GetLastUpdateDate()
{
DateTime lastUpdateDate = await service.GetLastUpdateDate();
return Ok(lastUpdateDate);
}
}