//
using System;
using ClipForge.Infrastructure.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace ClipForge.Infrastructure.Data.Migrations
{
[DbContext(typeof(AppDbContext))]
partial class AppDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "9.0.1")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("ClipForge.Core.Entities.CaptionAsset", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("CaptionStyle")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.Property("CreatedAt")
.HasColumnType("timestamp with time zone");
b.Property("FontColor")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("character varying(20)");
b.Property("FontFamily")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("character varying(100)");
b.Property("FontSize")
.HasColumnType("integer");
b.Property("SrtFilePath")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("character varying(1000)");
b.Property("StrokeColor")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("character varying(20)");
b.Property("StrokeWidth")
.HasColumnType("integer");
b.Property("UpdatedAt")
.HasColumnType("timestamp with time zone");
b.Property("VideoAssetId")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("VideoAssetId")
.IsUnique();
b.ToTable("CaptionAssets");
});
modelBuilder.Entity("ClipForge.Core.Entities.PublishJob", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("Caption")
.HasMaxLength(2000)
.HasColumnType("character varying(2000)");
b.Property("CreatedAt")
.HasColumnType("timestamp with time zone");
b.Property("ErrorMessage")
.HasMaxLength(2000)
.HasColumnType("character varying(2000)");
b.Property("ExternalId")
.HasMaxLength(500)
.HasColumnType("character varying(500)");
b.Property("Hashtags")
.HasMaxLength(1000)
.HasColumnType("character varying(1000)");
b.Property("Platform")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.Property("PublishedAt")
.HasColumnType("timestamp with time zone");
b.Property("ScheduledAt")
.HasColumnType("timestamp with time zone");
b.Property("SocialAccountId")
.HasColumnType("uuid");
b.Property("Status")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.Property("UpdatedAt")
.HasColumnType("timestamp with time zone");
b.Property("VideoAssetId")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("SocialAccountId");
b.HasIndex("VideoAssetId");
b.ToTable("PublishJobs");
});
modelBuilder.Entity("ClipForge.Core.Entities.SocialAccount", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("AccessToken")
.HasMaxLength(2000)
.HasColumnType("character varying(2000)");
b.Property("AccountName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("character varying(200)");
b.Property("CreatedAt")
.HasColumnType("timestamp with time zone");
b.Property("IsActive")
.HasColumnType("boolean");
b.Property("Platform")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.Property("RefreshToken")
.HasMaxLength(2000)
.HasColumnType("character varying(2000)");
b.Property("TokenExpiresAt")
.HasColumnType("timestamp with time zone");
b.Property("UpdatedAt")
.HasColumnType("timestamp with time zone");
b.HasKey("Id");
b.ToTable("SocialAccounts");
});
modelBuilder.Entity("ClipForge.Core.Entities.VideoAsset", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("CreatedAt")
.HasColumnType("timestamp with time zone");
b.Property("DurationSeconds")
.HasColumnType("double precision");
b.Property("FilePath")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("character varying(1000)");
b.Property("FileSizeBytes")
.HasColumnType("bigint");
b.Property("Format")
.IsRequired()
.HasMaxLength(10)
.HasColumnType("character varying(10)");
b.Property("Height")
.HasColumnType("integer");
b.Property("Status")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.Property("ThumbnailPath")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("character varying(1000)");
b.Property("UpdatedAt")
.HasColumnType("timestamp with time zone");
b.Property("VideoScriptId")
.HasColumnType("uuid");
b.Property("Width")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("VideoScriptId")
.IsUnique();
b.ToTable("VideoAssets");
});
modelBuilder.Entity("ClipForge.Core.Entities.VideoIdea", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("CreatedAt")
.HasColumnType("timestamp with time zone");
b.Property("Hook")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("character varying(1000)");
b.Property("Niche")
.HasMaxLength(200)
.HasColumnType("character varying(200)");
b.Property("Platform")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.Property("Status")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.Property("Tags")
.HasMaxLength(1000)
.HasColumnType("character varying(1000)");
b.Property("TargetAudience")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("character varying(200)");
b.Property("Title")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("character varying(500)");
b.Property("Topic")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("character varying(500)");
b.Property("UpdatedAt")
.HasColumnType("timestamp with time zone");
b.HasKey("Id");
b.ToTable("VideoIdeas");
});
modelBuilder.Entity("ClipForge.Core.Entities.VideoScript", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("CreatedAt")
.HasColumnType("timestamp with time zone");
b.Property("EstimatedDurationSeconds")
.HasColumnType("integer");
b.Property("Language")
.IsRequired()
.HasMaxLength(10)
.HasColumnType("character varying(10)");
b.Property("Scenes")
.IsRequired()
.HasColumnType("text");
b.Property("ScriptText")
.IsRequired()
.HasColumnType("text");
b.Property("Tone")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.Property("UpdatedAt")
.HasColumnType("timestamp with time zone");
b.Property("VideoIdeaId")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("VideoIdeaId")
.IsUnique();
b.ToTable("VideoScripts");
});
modelBuilder.Entity("ClipForge.Core.Entities.VoiceAsset", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("CreatedAt")
.HasColumnType("timestamp with time zone");
b.Property("DurationSeconds")
.HasColumnType("double precision");
b.Property("FilePath")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("character varying(1000)");
b.Property("FileSizeBytes")
.HasColumnType("bigint");
b.Property("UpdatedAt")
.HasColumnType("timestamp with time zone");
b.Property("VideoScriptId")
.HasColumnType("uuid");
b.Property("VoiceId")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("character varying(100)");
b.Property("VoiceProvider")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.HasKey("Id");
b.HasIndex("VideoScriptId")
.IsUnique();
b.ToTable("VoiceAssets");
});
modelBuilder.Entity("ClipForge.Core.Entities.CaptionAsset", b =>
{
b.HasOne("ClipForge.Core.Entities.VideoAsset", "VideoAsset")
.WithOne("CaptionAsset")
.HasForeignKey("ClipForge.Core.Entities.CaptionAsset", "VideoAssetId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("VideoAsset");
});
modelBuilder.Entity("ClipForge.Core.Entities.PublishJob", b =>
{
b.HasOne("ClipForge.Core.Entities.SocialAccount", "SocialAccount")
.WithMany("PublishJobs")
.HasForeignKey("SocialAccountId");
b.HasOne("ClipForge.Core.Entities.VideoAsset", "VideoAsset")
.WithMany("PublishJobs")
.HasForeignKey("VideoAssetId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("SocialAccount");
b.Navigation("VideoAsset");
});
modelBuilder.Entity("ClipForge.Core.Entities.VideoAsset", b =>
{
b.HasOne("ClipForge.Core.Entities.VideoScript", "VideoScript")
.WithOne("VideoAsset")
.HasForeignKey("ClipForge.Core.Entities.VideoAsset", "VideoScriptId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("VideoScript");
});
modelBuilder.Entity("ClipForge.Core.Entities.VideoScript", b =>
{
b.HasOne("ClipForge.Core.Entities.VideoIdea", "VideoIdea")
.WithOne("Script")
.HasForeignKey("ClipForge.Core.Entities.VideoScript", "VideoIdeaId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("VideoIdea");
});
modelBuilder.Entity("ClipForge.Core.Entities.VoiceAsset", b =>
{
b.HasOne("ClipForge.Core.Entities.VideoScript", "VideoScript")
.WithOne("VoiceAsset")
.HasForeignKey("ClipForge.Core.Entities.VoiceAsset", "VideoScriptId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("VideoScript");
});
modelBuilder.Entity("ClipForge.Core.Entities.SocialAccount", b =>
{
b.Navigation("PublishJobs");
});
modelBuilder.Entity("ClipForge.Core.Entities.VideoAsset", b =>
{
b.Navigation("CaptionAsset");
b.Navigation("PublishJobs");
});
modelBuilder.Entity("ClipForge.Core.Entities.VideoIdea", b =>
{
b.Navigation("Script");
});
modelBuilder.Entity("ClipForge.Core.Entities.VideoScript", b =>
{
b.Navigation("VideoAsset");
b.Navigation("VoiceAsset");
});
#pragma warning restore 612, 618
}
}
}