docs: add xml comments for tenant modules

This commit is contained in:
2025-12-03 22:56:35 +08:00
parent 83c81d5fd1
commit bf88f0e041
28 changed files with 661 additions and 40 deletions

View File

@@ -12,6 +12,7 @@ namespace TakeoutSaaS.Infrastructure.App.Repositories;
/// </summary>
public sealed class EfTenantNotificationRepository(TakeoutAppDbContext context) : ITenantNotificationRepository
{
/// <inheritdoc />
public Task<IReadOnlyList<TenantNotification>> SearchAsync(
long tenantId,
TenantNotificationSeverity? severity,
@@ -49,23 +50,27 @@ public sealed class EfTenantNotificationRepository(TakeoutAppDbContext context)
.ContinueWith(t => (IReadOnlyList<TenantNotification>)t.Result, cancellationToken);
}
/// <inheritdoc />
public Task<TenantNotification?> FindByIdAsync(long tenantId, long notificationId, CancellationToken cancellationToken = default)
{
return context.TenantNotifications
.FirstOrDefaultAsync(x => x.TenantId == tenantId && x.Id == notificationId, cancellationToken);
}
/// <inheritdoc />
public Task AddAsync(TenantNotification notification, CancellationToken cancellationToken = default)
{
return context.TenantNotifications.AddAsync(notification, cancellationToken).AsTask();
}
/// <inheritdoc />
public Task UpdateAsync(TenantNotification notification, CancellationToken cancellationToken = default)
{
context.TenantNotifications.Update(notification);
return Task.CompletedTask;
}
/// <inheritdoc />
public Task SaveChangesAsync(CancellationToken cancellationToken = default)
{
return context.SaveChangesAsync(cancellationToken);