persistence/Persistence.API/Controllers/ChangeLogController.cs

62 lines
1.9 KiB
C#

using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Persistence.Database.Model;
using Persistence.Models;
using Persistence.Repositories;
namespace Persistence.API.Controllers;
[ApiController]
[Authorize]
[Route("api/[controller]")]
public class ChangeLogRotorController : ControllerBase, IChangeLogApi<ProcessMapRotorDto, ChangeLogDto<ProcessMapRotorDto>>
{
private IChangeLogRepository<ProcessMapRotorDto, ChangeLogDto<ProcessMapRotorDto>> repository;
public ChangeLogRotorController(IChangeLogRepository<ProcessMapRotorDto, ChangeLogDto<ProcessMapRotorDto>> repository)
{
this.repository = repository;
}
public async Task<ActionResult<int>> Add(ProcessMapRotorDto dto, CancellationToken token)
{
await repository.InsertRange(0, [dto], token);
return null;
}
public Task<ActionResult<int>> AddRange(IEnumerable<ProcessMapRotorDto> dtos, CancellationToken token)
{
throw new NotImplementedException();
}
public Task<ActionResult<int>> Delete(int id, CancellationToken token)
{
throw new NotImplementedException();
}
public Task<ActionResult<int>> DeleteRange(IEnumerable<int> ids, CancellationToken token)
{
throw new NotImplementedException();
}
public Task<ActionResult<IEnumerable<ProcessMapRotorDto>>> GetChangeLogCurrent(CancellationToken token)
{
throw new NotImplementedException();
}
public Task<ActionResult<IEnumerable<ChangeLogDto<ProcessMapRotorDto>>>> GetChangeLogForDate(DateTimeOffset historyMoment, CancellationToken token)
{
throw new NotImplementedException();
}
public Task<ActionResult<int>> Update(ProcessMapRotorDto dto, CancellationToken token)
{
throw new NotImplementedException();
}
public Task<ActionResult<int>> UpdateRange(IEnumerable<ProcessMapRotorDto> dtos, CancellationToken token)
{
throw new NotImplementedException();
}
}