Post embed

This commit is contained in:
2025-09-07 22:39:42 +08:00
parent 6cedda9307
commit eaa3a9c297
5 changed files with 2195 additions and 1 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,29 @@
using DysonNetwork.Sphere.Post;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace DysonNetwork.Sphere.Migrations
{
/// <inheritdoc />
public partial class AddPostEmbedView : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<PostEmbedView>(
name: "embed_view",
table: "posts",
type: "jsonb",
nullable: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "embed_view",
table: "posts");
}
}
}

View File

@@ -6,6 +6,7 @@ using DysonNetwork.Shared.Data;
using DysonNetwork.Sphere;
using DysonNetwork.Sphere.Chat;
using DysonNetwork.Sphere.Poll;
using DysonNetwork.Sphere.Post;
using DysonNetwork.Sphere.WebReader;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
@@ -557,6 +558,10 @@ namespace DysonNetwork.Sphere.Migrations
.HasColumnType("timestamp with time zone")
.HasColumnName("edited_at");
b.Property<PostEmbedView>("EmbedView")
.HasColumnType("jsonb")
.HasColumnName("embed_view");
b.Property<bool>("ForwardedGone")
.HasColumnType("boolean")
.HasColumnName("forwarded_gone");