feat: 添加推送通知功能,支持订阅和发送通知
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 40s
Docker Build & Deploy / Deploy to Production (push) Successful in 8s

This commit is contained in:
2026-01-02 12:25:44 +08:00
parent a055e43451
commit e250a7df2f
17 changed files with 382 additions and 13 deletions

View File

@@ -0,0 +1,16 @@
namespace Repository;
public interface IPushSubscriptionRepository : IBaseRepository<PushSubscriptionEntity>
{
Task<PushSubscriptionEntity?> GetByEndpointAsync(string endpoint);
}
public class PushSubscriptionRepository(IFreeSql freeSql) : BaseRepository<PushSubscriptionEntity>(freeSql), IPushSubscriptionRepository
{
public async Task<PushSubscriptionEntity?> GetByEndpointAsync(string endpoint)
{
return await FreeSql.Select<PushSubscriptionEntity>()
.Where(x => x.Endpoint == endpoint)
.FirstAsync();
}
}