Added new endpoint to manage deliveries

This commit is contained in:
2026-05-26 10:53:10 +01:00
parent 57646a1417
commit b13b8ebfb6
3 changed files with 39 additions and 1 deletions
@@ -0,0 +1,17 @@
using Ardalis.Specification;
using PyroFetes.Models;
namespace PyroFetes.Specifications.DeliveryNotes;
public class GetAllDeliveryNotesByRealDateSpec : Specification<DeliveryNote>
{
public GetAllDeliveryNotesByRealDateSpec()
{
Query
.Include(x => x.Deliverer)
.Include(x => x.ProductDeliveries)!
.ThenInclude(x => x.Product)
.Where(x => x.RealDeliveryDate == null)
.OrderByDescending(x => x.RealDeliveryDate);
}
}