Adds subscriptions

This commit is contained in:
Jonathan Bourdon
2024-08-04 03:27:21 -04:00
parent 303619cc18
commit 68ef947e26
12 changed files with 413 additions and 147 deletions

View File

@@ -39,17 +39,21 @@ namespace Hutopy.Web.Features.Contents.Migrations
b.Property<string>("Description")
.IsRequired()
.HasColumnType("text");
.HasMaxLength(2048)
.HasColumnType("character varying(2048)");
b.Property<string>("Title")
.IsRequired()
.HasColumnType("text");
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string[]>("Urls")
.HasColumnType("text[]");
b.HasKey("Id");
b.HasIndex("CreatedBy");
b.ToTable("Contents", "Content");
});
@@ -75,6 +79,35 @@ namespace Hutopy.Web.Features.Contents.Migrations
b.ToTable("Creators", "Content");
});
modelBuilder.Entity("Hutopy.Web.Features.Contents.Data.Subscription", b =>
{
b.Property<Guid>("CreatedBy")
.HasColumnType("uuid");
b.Property<Guid>("CreatorId")
.HasColumnType("uuid");
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("timestamp with time zone");
b.HasKey("CreatedBy", "CreatorId");
b.HasIndex("CreatorId");
b.ToTable("Subscriptions", "Content");
});
modelBuilder.Entity("Hutopy.Web.Features.Contents.Data.Content", b =>
{
b.HasOne("Hutopy.Web.Features.Contents.Data.Creator", "Creator")
.WithMany()
.HasForeignKey("CreatedBy")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Creator");
});
modelBuilder.Entity("Hutopy.Web.Features.Contents.Data.Creator", b =>
{
b.OwnsOne("Hutopy.Web.Features.Contents.Data.About", "About", b1 =>
@@ -121,7 +154,7 @@ namespace Hutopy.Web.Features.Contents.Migrations
b1.HasKey("CreatorId");
b1.ToTable("Creators", "Content");
b1.ToTable("ProfileColors", "Content");
b1.WithOwner()
.HasForeignKey("CreatorId");
@@ -166,7 +199,7 @@ namespace Hutopy.Web.Features.Contents.Migrations
b1.HasKey("CreatorId");
b1.ToTable("Creators", "Content");
b1.ToTable("SocialNetworks", "Content");
b1.WithOwner()
.HasForeignKey("CreatorId");
@@ -187,7 +220,7 @@ namespace Hutopy.Web.Features.Contents.Migrations
b1.HasKey("CreatorId");
b1.ToTable("Creators", "Content");
b1.ToTable("StoredDataUrls", "Content");
b1.WithOwner()
.HasForeignKey("CreatorId");
@@ -205,6 +238,17 @@ namespace Hutopy.Web.Features.Contents.Migrations
b.Navigation("StoredDataUrls")
.IsRequired();
});
modelBuilder.Entity("Hutopy.Web.Features.Contents.Data.Subscription", b =>
{
b.HasOne("Hutopy.Web.Features.Contents.Data.Creator", "Creator")
.WithMany()
.HasForeignKey("CreatorId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Creator");
});
#pragma warning restore 612, 618
}
}