feat(data): persist weekday bitmask in prime schedule repo

This commit is contained in:
mika kuns
2026-06-02 16:09:49 +02:00
parent eaf27e8b3a
commit 0efad7a004

View File

@@ -13,9 +13,9 @@ public sealed class PrimeScheduleRepository
public async Task<IReadOnlyList<PrimeScheduleEntity>> ListAsync(CancellationToken ct = default)
{
var rows = await _context.PrimeSchedules.AsNoTracking()
.OrderBy(s => s.StartDate)
.OrderBy(s => s.TimeOfDay)
.ToListAsync(ct);
return rows.OrderBy(s => s.StartDate).ThenBy(s => s.TimeOfDay).ToList();
return rows;
}
public async Task<PrimeScheduleEntity?> GetAsync(Guid id, CancellationToken ct = default) =>
@@ -30,10 +30,8 @@ public sealed class PrimeScheduleRepository
}
else
{
existing.StartDate = entity.StartDate;
existing.EndDate = entity.EndDate;
existing.Days = entity.Days;
existing.TimeOfDay = entity.TimeOfDay;
existing.WorkdaysOnly = entity.WorkdaysOnly;
existing.Enabled = entity.Enabled;
existing.PromptOverride = entity.PromptOverride;
}