Files
Backend-Api/WorkFlow/Infrastructure/WorkFlow.Infrastructure.ACL/Checkout/IWorkFlowCheckoutACL.cs
2024-12-23 20:39:04 +03:30

37 lines
1.5 KiB
C#

using CompanyManagment.App.Contracts.Checkout;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WorkFlow.Infrastructure.ACL.Checkout
{
public interface IWorkFlowCheckoutACL
{
List<(long EmployeeId, DateTime CheckoutStart, DateTime CheckoutEnd)> GetLastCheckoutsByWorkshopId(
long workshopId, DateTime start, DateTime end);
List<(long EmployeeId, DateTime CheckoutStart, DateTime CheckoutEnd)> GetLastCheckoutsByWorkshopIdForWorkFlow(
long workshopId, DateTime start, DateTime end);
}
public class WorkFlowCheckoutACL : IWorkFlowCheckoutACL
{
private readonly ICheckoutApplication _checkoutApplication;
public WorkFlowCheckoutACL(ICheckoutApplication checkoutApplication)
{
_checkoutApplication = checkoutApplication;
}
public List<(long EmployeeId, DateTime CheckoutStart, DateTime CheckoutEnd)> GetLastCheckoutsByWorkshopId(long workshopId, DateTime start, DateTime end)
{
return _checkoutApplication.GetLastCheckoutsByWorkshopId(workshopId, start, end);
}
public List<(long EmployeeId, DateTime CheckoutStart, DateTime CheckoutEnd)> GetLastCheckoutsByWorkshopIdForWorkFlow(long workshopId, DateTime start, DateTime end)
{
return _checkoutApplication.GetLastCheckoutsByWorkshopIdForWorkFlow(workshopId, start, end);
}
}
}