Stickers & packs api

This commit is contained in:
2025-05-10 21:28:25 +08:00
parent 790dcafeb0
commit eab775e224
8 changed files with 3324 additions and 11 deletions

View File

@ -1763,6 +1763,102 @@ namespace DysonNetwork.Sphere.Migrations
b.ToTable("realm_members", (string)null);
});
modelBuilder.Entity("DysonNetwork.Sphere.Sticker.Sticker", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid")
.HasColumnName("id");
b.Property<Instant>("CreatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("created_at");
b.Property<Instant?>("DeletedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("deleted_at");
b.Property<string>("ImageId")
.IsRequired()
.HasColumnType("character varying(128)")
.HasColumnName("image_id");
b.Property<Guid>("PackId")
.HasColumnType("uuid")
.HasColumnName("pack_id");
b.Property<string>("Slug")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("character varying(128)")
.HasColumnName("slug");
b.Property<Instant>("UpdatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("updated_at");
b.HasKey("Id")
.HasName("pk_stickers");
b.HasIndex("ImageId")
.HasDatabaseName("ix_stickers_image_id");
b.HasIndex("PackId")
.HasDatabaseName("ix_stickers_pack_id");
b.ToTable("stickers", (string)null);
});
modelBuilder.Entity("DysonNetwork.Sphere.Sticker.StickerPack", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid")
.HasColumnName("id");
b.Property<Instant>("CreatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("created_at");
b.Property<Instant?>("DeletedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("deleted_at");
b.Property<string>("Description")
.IsRequired()
.HasMaxLength(4096)
.HasColumnType("character varying(4096)")
.HasColumnName("description");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(1024)
.HasColumnType("character varying(1024)")
.HasColumnName("name");
b.Property<string>("Prefix")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("character varying(128)")
.HasColumnName("prefix");
b.Property<long>("PublisherId")
.HasColumnType("bigint")
.HasColumnName("publisher_id");
b.Property<Instant>("UpdatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("updated_at");
b.HasKey("Id")
.HasName("pk_sticker_packs");
b.HasIndex("PublisherId")
.HasDatabaseName("ix_sticker_packs_publisher_id");
b.ToTable("sticker_packs", (string)null);
});
modelBuilder.Entity("DysonNetwork.Sphere.Storage.CloudFile", b =>
{
b.Property<string>("Id")
@ -2421,6 +2517,39 @@ namespace DysonNetwork.Sphere.Migrations
b.Navigation("Realm");
});
modelBuilder.Entity("DysonNetwork.Sphere.Sticker.Sticker", b =>
{
b.HasOne("DysonNetwork.Sphere.Storage.CloudFile", "Image")
.WithMany()
.HasForeignKey("ImageId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("fk_stickers_files_image_id");
b.HasOne("DysonNetwork.Sphere.Sticker.StickerPack", "Pack")
.WithMany()
.HasForeignKey("PackId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("fk_stickers_sticker_packs_pack_id");
b.Navigation("Image");
b.Navigation("Pack");
});
modelBuilder.Entity("DysonNetwork.Sphere.Sticker.StickerPack", b =>
{
b.HasOne("DysonNetwork.Sphere.Post.Publisher", "Publisher")
.WithMany()
.HasForeignKey("PublisherId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("fk_sticker_packs_publishers_publisher_id");
b.Navigation("Publisher");
});
modelBuilder.Entity("DysonNetwork.Sphere.Storage.CloudFile", b =>
{
b.HasOne("DysonNetwork.Sphere.Account.Account", "Account")