20 lines
761 B
C#
20 lines
761 B
C#
using Distribution.Models;
|
|
|
|
namespace Distribution.Features.Po;
|
|
|
|
public interface IPoRepository
|
|
{
|
|
Task<Models.PurchaseOrder?> GetByIdAsync(Guid id);
|
|
Task<List<Models.PurchaseOrder>> GetAllAsync(Guid? supplierId, PurchaseOrderStatus? status);
|
|
Task AddAsync(Models.PurchaseOrder entity);
|
|
void Update(Models.PurchaseOrder entity);
|
|
|
|
Task AddItemAsync(PurchaseOrderItem entity);
|
|
|
|
/// <summary>True if any active (non-cancelled, non-closed-and-void) PurchaseOrder references this supplier.</summary>
|
|
Task<bool> HasActiveForSupplierAsync(Guid supplierId);
|
|
|
|
/// <summary>All active PurchaseOrders for a supplier, with items, used by evaluateSupplier.</summary>
|
|
Task<List<Models.PurchaseOrder>> GetBySupplierAsync(Guid supplierId);
|
|
}
|