2026-03-17 22:10:19 +01:00
|
|
|
using WorkTracker.Domain;
|
|
|
|
|
|
|
|
|
|
namespace WorkTracker.Services.WorkDays;
|
|
|
|
|
|
|
|
|
|
public interface IWorkDayService
|
|
|
|
|
{
|
|
|
|
|
Task<WorkDayDocument?> GetAsync(DateOnly date, CancellationToken cancellationToken = default);
|
|
|
|
|
|
2026-04-20 16:11:27 +02:00
|
|
|
Task<WorkUnitDocument?> GetWorkUnitAsync(DateOnly date, string workUnitId, CancellationToken cancellationToken = default);
|
|
|
|
|
|
|
|
|
|
Task<CalendarEventDocument?> GetCalendarEventAsync(DateOnly date, string calendarEventId, CancellationToken cancellationToken = default);
|
|
|
|
|
|
|
|
|
|
Task<WorkUnitDocument> SaveWorkUnitAsync(DateOnly date, WorkUnitDocument workUnit, CancellationToken cancellationToken = default);
|
|
|
|
|
|
|
|
|
|
Task<CalendarEventDocument> SaveCalendarEventAsync(DateOnly date, CalendarEventDocument calendarEvent, CancellationToken cancellationToken = default);
|
|
|
|
|
|
|
|
|
|
Task<bool> DeleteWorkUnitAsync(DateOnly date, string workUnitId, CancellationToken cancellationToken = default);
|
|
|
|
|
|
|
|
|
|
Task<bool> DeleteCalendarEventAsync(DateOnly date, string calendarEventId, CancellationToken cancellationToken = default);
|
2026-03-17 22:10:19 +01:00
|
|
|
|
|
|
|
|
Task<IReadOnlyList<WorkDayDocument>> GetRangeAsync(DateOnly from, DateOnly to, CancellationToken cancellationToken = default);
|
|
|
|
|
|
2026-04-20 16:11:27 +02:00
|
|
|
Task<MonthlySummaryModel> GetMonthlySummaryAsync(int year, int month, bool includePreview, CancellationToken cancellationToken = default);
|
|
|
|
|
|
2026-04-20 23:56:23 +02:00
|
|
|
Task<IReadOnlyList<MonthlySummaryModel>> GetYearlySummaryAsync(int year, bool includePreview, CancellationToken cancellationToken = default);
|
|
|
|
|
|
2026-04-20 17:23:54 +02:00
|
|
|
Task<MonthlyTimesheetModel> GetMonthlyTimesheetAsync(int year, int month, bool includePreview, CancellationToken cancellationToken = default);
|
|
|
|
|
|
2026-04-20 16:11:27 +02:00
|
|
|
Task<int> GenerateMonthlyPreviewWorkUnitsAsync(int year, int month, CancellationToken cancellationToken = default);
|
2026-03-17 22:10:19 +01:00
|
|
|
}
|