//
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using SlpModularCms.Modules.Hero.Data;
#nullable disable
namespace SlpModularCms.Modules.Hero.Migrations
{
[DbContext(typeof(HeroDbContext))]
[Migration("20261117231338_DropHeroImagesTable")]
partial class DropHeroImagesTable
{
///
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "10.0.9")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
modelBuilder.Entity("SlpModularCms.Modules.Hero.Data.Entities.HeroContent", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property("Button1Label")
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.Property("Button1Target")
.HasMaxLength(500)
.HasColumnType("varchar(500)");
b.Property("Button2Label")
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.Property("Button2Target")
.HasMaxLength(500)
.HasColumnType("varchar(500)");
b.Property("Display")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("varchar(20)");
b.Property("Language")
.IsRequired()
.HasMaxLength(10)
.HasColumnType("varchar(10)");
b.Property("LastModifiedByUserId")
.HasColumnType("char(36)");
b.Property("Lead")
.HasMaxLength(1000)
.HasColumnType("varchar(1000)");
b.Property("Tagline")
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property("Title")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("varchar(1000)");
b.Property("UpdatedAt")
.HasColumnType("datetime");
b.HasKey("Id");
b.HasIndex("Language")
.IsUnique();
b.ToTable("Heroes", (string)null);
});
modelBuilder.Entity("SlpModularCms.Modules.Hero.Data.Entities.HeroImage", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property("Bytes")
.HasColumnType("bigint");
b.Property("CreatedAt")
.HasColumnType("datetime");
b.Property("CreatedByUserId")
.HasColumnType("char(36)");
b.Property("DeletedAt")
.HasColumnType("datetime");
b.Property("FocusX")
.HasColumnType("double")
.HasColumnName("DefaultFocusX");
b.Property("FocusY")
.HasColumnType("double")
.HasColumnName("DefaultFocusY");
b.Property("Height")
.HasColumnType("int");
b.Property("LastUsedAt")
.HasColumnType("datetime");
b.Property("Module")
.IsRequired()
.ValueGeneratedOnAdd()
.HasMaxLength(20)
.HasColumnType("varchar(20)")
.HasDefaultValue("hero");
b.Property("OriginalFileName")
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property("OriginalKey")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property("OriginalSha256")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("varchar(64)");
b.Property("SetHash")
.IsRequired()
.HasMaxLength(16)
.HasColumnType("varchar(16)");
b.Property("SourceFormat")
.IsRequired()
.HasMaxLength(10)
.HasColumnType("varchar(10)");
b.Property("TallFocusX")
.HasColumnType("double");
b.Property("TallFocusY")
.HasColumnType("double");
b.Property("TallZoom")
.HasColumnType("double");
b.Property("Variants")
.IsRequired()
.HasColumnType("longtext");
b.Property("WideFocusX")
.HasColumnType("double");
b.Property("WideFocusY")
.HasColumnType("double");
b.Property("WideZoom")
.HasColumnType("double");
b.Property("Width")
.HasColumnType("int");
b.Property("Zoom")
.HasColumnType("double")
.HasColumnName("DefaultZoom");
b.HasKey("Id");
b.HasIndex("OriginalSha256")
.IsUnique();
b.ToTable("MediaAssets", null, t =>
{
t.ExcludeFromMigrations();
});
});
modelBuilder.Entity("SlpModularCms.Modules.Hero.Data.Entities.HeroRetiredFile", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property("Key")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property("Kind")
.IsRequired()
.HasMaxLength(10)
.HasColumnType("varchar(10)");
b.Property("RetiredAt")
.HasColumnType("datetime");
b.HasKey("Id");
b.ToTable("HeroRetiredFiles", (string)null);
});
modelBuilder.Entity("SlpModularCms.Modules.Hero.Data.Entities.HeroSlide", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property("Alt")
.IsRequired()
.HasMaxLength(600)
.HasColumnType("varchar(600)");
b.Property("Decorative")
.HasColumnType("tinyint(1)");
b.Property("FocusX")
.HasColumnType("double");
b.Property("FocusY")
.HasColumnType("double");
b.Property("HeroId")
.HasColumnType("char(36)");
b.Property("ImageId")
.HasColumnType("char(36)");
b.Property("IsActive")
.HasColumnType("tinyint(1)");
b.Property("SetHash")
.HasMaxLength(16)
.HasColumnType("varchar(16)");
b.Property("SortOrder")
.HasColumnType("int");
b.Property("TallFocusX")
.HasColumnType("double");
b.Property("TallFocusY")
.HasColumnType("double");
b.Property("TallZoom")
.HasColumnType("double");
b.Property("Variants")
.HasColumnType("longtext");
b.Property("WideFocusX")
.HasColumnType("double");
b.Property("WideFocusY")
.HasColumnType("double");
b.Property("WideZoom")
.HasColumnType("double");
b.Property("Zoom")
.HasColumnType("double");
b.HasKey("Id");
b.HasIndex("ImageId");
b.HasIndex("HeroId", "SortOrder");
b.ToTable("HeroSlides", (string)null);
});
modelBuilder.Entity("SlpModularCms.Modules.Hero.Data.Entities.HeroSlide", b =>
{
b.HasOne("SlpModularCms.Modules.Hero.Data.Entities.HeroContent", null)
.WithMany("Slides")
.HasForeignKey("HeroId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("SlpModularCms.Modules.Hero.Data.Entities.HeroImage", "Image")
.WithMany()
.HasForeignKey("ImageId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.Navigation("Image");
});
modelBuilder.Entity("SlpModularCms.Modules.Hero.Data.Entities.HeroContent", b =>
{
b.Navigation("Slides");
});
#pragma warning restore 612, 618
}
}
}