feat(push): add service-owned firebase channels and delivery
Add push contracts, provider delivery and channel diagnostics. Link email channels to services and document migration and validation. Ref: IT-1074
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
using HrynCo.NotificationService.DAL.EF.Entities;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace HrynCo.NotificationService.DAL.EF.Configurations;
|
||||
|
||||
internal sealed class PushChannelEntityConfiguration : IEntityTypeConfiguration<PushChannelEntity>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<PushChannelEntity> builder)
|
||||
{
|
||||
builder.ToTable("push_channels");
|
||||
builder.HasKey(x => x.Id);
|
||||
builder.Property(x => x.Id).HasColumnName("id");
|
||||
builder.Property(x => x.ServiceId).HasColumnName("service_id");
|
||||
builder.HasIndex(x => x.ServiceId).IsUnique();
|
||||
builder.HasOne(x => x.Service).WithMany().HasForeignKey(x => x.ServiceId).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.Property(x => x.FirebaseProjectId).HasColumnName("firebase_project_id").HasMaxLength(30).IsRequired();
|
||||
builder.Property(x => x.CredentialsJson).HasColumnName("credentials").HasColumnType("jsonb").IsRequired();
|
||||
builder.Property(x => x.IsActive).HasColumnName("is_active");
|
||||
builder.Property(x => x.Created).HasColumnName("created");
|
||||
builder.Property(x => x.Updated).HasColumnName("updated");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user