Files
GestionIntegralWeb/Backend/GestionIntegral.Api/Data/Repositories/Distribucion/INovedadCanillaRepository.cs

27 lines
1.7 KiB
C#
Raw Normal View History

using GestionIntegral.Api.Dtos.Reportes;
using GestionIntegral.Api.Models.Distribucion;
using System;
using System.Collections.Generic;
using System.Data; // Para IDbTransaction
using System.Threading.Tasks;
namespace GestionIntegral.Api.Data.Repositories.Distribucion
{
public interface INovedadCanillaRepository
{
// Para obtener novedades y el nombre del canillita
Task<IEnumerable<(NovedadCanilla Novedad, string NombreCanilla)>> GetByCanillaAsync(int idCanilla, DateTime? fechaDesde, DateTime? fechaHasta);
Task<NovedadCanilla?> GetByIdAsync(int idNovedad);
Task<NovedadCanilla?> CreateAsync(NovedadCanilla novedad, int idUsuario, IDbTransaction? transaction = null);
Task<bool> UpdateAsync(NovedadCanilla novedad, int idUsuario, IDbTransaction? transaction = null);
Task<bool> DeleteAsync(int idNovedad, int idUsuario, IDbTransaction? transaction = null);
// Podrías añadir un método para verificar si existe una novedad para un canillita en una fecha específica si es necesario
Task<bool> ExistsByCanillaAndFechaAsync(int idCanilla, DateTime fecha, int? excludeIdNovedad = null);
Task<IEnumerable<NovedadesCanillasReporteDto>> GetReporteNovedadesAsync(int idEmpresa, DateTime fechaDesde, DateTime fechaHasta);
Task<IEnumerable<CanillaGananciaReporteDto>> GetReporteGananciasAsync(int idEmpresa, DateTime fechaDesde, DateTime fechaHasta);
Task<IEnumerable<(NovedadCanillaHistorico Historial, string NombreUsuarioModifico)>> GetHistorialAsync(
DateTime? fechaDesde, DateTime? fechaHasta,
int? idUsuarioModifico, string? tipoModificacion,
int? idNovedadOriginal);
}
}