Added support for notifications

This commit is contained in:
Khwezi Mngoma
2026-05-05 14:36:46 +02:00
parent f5c9557f59
commit 4b822c63b2
19 changed files with 230 additions and 12 deletions
@@ -8,17 +8,23 @@ public class GetLeadsQuery : IRequest<Result<Lead[]>>
public DateOnly To { get; set; }
private GetLeadsQuery(DateOnly from, DateOnly to)
public int MaxRecords { get; set; }
private GetLeadsQuery(DateOnly from, DateOnly to, int maxRecords = 1000)
{
From = from;
To = to;
MaxRecords = maxRecords;
}
public static GetLeadsQuery Create(DateOnly from, DateOnly to)
public static GetLeadsQuery Create(DateOnly from, DateOnly to, int maxRecords = 1000)
{
if (from > to)
throw new ArgumentException("From date cannot be greater than To date.");
return new(from, to);
if(maxRecords <= 0)
throw new ArgumentException("MaxRecords must be a positive integer.");
return new(from, to, maxRecords);
}
}