feat(marketing): implement marketing calendar backend
All checks were successful
Build and Deploy TenantApi + SkuWorker / build-and-deploy (push) Successful in 1m59s

This commit is contained in:
2026-03-03 10:10:41 +08:00
parent decfa4fa12
commit 1b28fa6db4
8 changed files with 1891 additions and 1 deletions

View File

@@ -92,6 +92,20 @@ public sealed class EfPunchCardRepository(TakeoutAppDbContext context) : IPunchC
.ToListAsync(cancellationToken);
}
/// <inheritdoc />
public async Task<IReadOnlyList<PunchCardTemplate>> GetTemplatesByStoreAsync(
long tenantId,
long storeId,
CancellationToken cancellationToken = default)
{
return await context.PunchCardTemplates
.AsNoTracking()
.Where(item => item.TenantId == tenantId && item.StoreId == storeId)
.OrderByDescending(item => item.UpdatedAt ?? item.CreatedAt)
.ThenByDescending(item => item.Id)
.ToListAsync(cancellationToken);
}
/// <inheritdoc />
public async Task<Dictionary<long, PunchCardTemplateAggregateSnapshot>> GetTemplateAggregateByTemplateIdsAsync(
long tenantId,