//
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using PLib.Infrastructure.Persistence;
#nullable disable
namespace PLib.Infrastructure.Persistence.Migrations
{
[DbContext(typeof(LibraryDbContext))]
[Migration("20260809051032_SceneMetadata")]
partial class SceneMetadata
{
///
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "10.0.10");
modelBuilder.Entity("LibraryLabelVideoItem", b =>
{
b.Property("LabelsId")
.HasColumnType("TEXT");
b.Property("VideosId")
.HasColumnType("TEXT");
b.HasKey("LabelsId", "VideosId");
b.HasIndex("VideosId");
b.ToTable("VideoLabels", (string)null);
});
modelBuilder.Entity("PLib.Domain.Videos.LibraryLabel", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("CreatedAt")
.HasColumnType("INTEGER");
b.Property("Kind")
.IsRequired()
.HasMaxLength(16)
.HasColumnType("TEXT");
b.Property("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("NormalizedName")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("Kind", "NormalizedName")
.IsUnique();
b.ToTable("Labels", (string)null);
});
modelBuilder.Entity("PLib.Domain.Videos.VideoItem", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("AddedAt")
.HasColumnType("INTEGER");
b.Property("Description")
.HasColumnType("TEXT");
b.Property("Duration")
.HasColumnType("TEXT");
b.Property("FileModifiedAt")
.HasColumnType("INTEGER");
b.Property("FullPath")
.IsRequired()
.HasMaxLength(1024)
.HasColumnType("TEXT");
b.Property("Height")
.HasColumnType("INTEGER");
b.Property("LastPlayedAt")
.HasColumnType("INTEGER");
b.Property("PerceptualHash")
.HasColumnType("INTEGER");
b.Property("PlayCount")
.HasColumnType("INTEGER");
b.Property("PreviewFrameCount")
.HasColumnType("INTEGER");
b.Property("PreviewPath")
.HasMaxLength(1024)
.HasColumnType("TEXT");
b.Property("ResumePosition")
.HasColumnType("TEXT");
b.Property("SizeInBytes")
.HasColumnType("INTEGER");
b.Property("ThumbnailPath")
.HasMaxLength(1024)
.HasColumnType("TEXT");
b.Property("Title")
.IsRequired()
.HasMaxLength(512)
.HasColumnType("TEXT");
b.Property("VideoCodec")
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("Width")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("AddedAt");
b.HasIndex("FullPath")
.IsUnique();
b.HasIndex("LastPlayedAt");
b.HasIndex("PerceptualHash");
b.ToTable("Videos", (string)null);
});
modelBuilder.Entity("LibraryLabelVideoItem", b =>
{
b.HasOne("PLib.Domain.Videos.LibraryLabel", null)
.WithMany()
.HasForeignKey("LabelsId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("PLib.Domain.Videos.VideoItem", null)
.WithMany()
.HasForeignKey("VideosId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
#pragma warning restore 612, 618
}
}
}