// using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using HardwarePerformance.Infrastructure.Data; #nullable disable namespace HardwarePerformance.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.0") .HasAnnotation("Relational:MaxIdentifierLength", 64); MySqlModelBuilderExtensions.UseCollation(modelBuilder, "utf8mb4_0900_ai_ci"); modelBuilder.Entity("HardwarePerformance.Core.Entities.Category", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); b.Property("CreatedAt") .HasColumnType("datetime(6)"); b.Property("Description") .HasColumnType("text"); b.Property("Name") .IsRequired() .HasMaxLength(100) .HasColumnType("varchar(100)"); b.Property("UpdatedAt") .HasColumnType("datetime(6)"); b.HasKey("Id"); b.ToTable("Categories"); }); modelBuilder.Entity("HardwarePerformance.Core.Entities.DataSource", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); b.Property("ApiUrl") .HasMaxLength(500) .HasColumnType("varchar(500)"); b.Property("CreatedAt") .HasColumnType("datetime(6)"); b.Property("Description") .HasColumnType("text"); b.Property("Name") .IsRequired() .HasMaxLength(100) .HasColumnType("varchar(100)"); b.Property("UpdatedAt") .HasColumnType("datetime(6)"); b.HasKey("Id"); b.ToTable("DataSources"); }); modelBuilder.Entity("HardwarePerformance.Core.Entities.PerformanceScore", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); b.Property("BenchmarkType") .IsRequired() .HasMaxLength(50) .HasColumnType("varchar(50)"); b.Property("CreatedAt") .HasColumnType("datetime(6)"); b.Property("DataSourceId") .HasColumnType("int"); b.Property("ProductId") .HasColumnType("int"); b.Property("Score") .HasColumnType("decimal(10,2)"); b.Property("TestDate") .HasColumnType("datetime(6)"); b.Property("UpdatedAt") .HasColumnType("datetime(6)"); b.HasKey("Id"); b.HasIndex("BenchmarkType"); b.HasIndex("ProductId"); b.ToTable("PerformanceScores"); }); modelBuilder.Entity("HardwarePerformance.Core.Entities.Product", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); b.Property("CategoryId") .HasColumnType("int"); b.Property("CreatedAt") .HasColumnType("datetime(6)"); b.Property("ImageUrl") .HasMaxLength(500) .HasColumnType("varchar(500)"); b.Property("Manufacturer") .IsRequired() .HasMaxLength(100) .HasColumnType("varchar(100)"); b.Property("Model") .IsRequired() .HasMaxLength(100) .HasColumnType("varchar(100)"); b.Property("Name") .IsRequired() .HasMaxLength(200) .HasColumnType("varchar(200)"); b.Property("CurrentRank") .HasColumnType("int"); b.Property("ReleaseDate") .HasColumnType("datetime(6)"); b.Property("UpdatedAt") .HasColumnType("datetime(6)"); b.HasKey("Id"); b.HasIndex("CategoryId"); b.HasIndex("Manufacturer"); b.HasIndex("Model"); b.HasIndex("Name"); b.ToTable("Products"); }); modelBuilder.Entity("HardwarePerformance.Core.Entities.RankingHistory", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); b.Property("CategoryId") .HasColumnType("int"); b.Property("CreatedAt") .HasColumnType("datetime(6)"); b.Property("ProductId") .HasColumnType("int"); b.Property("Rank") .HasColumnType("int"); b.Property("RecordDate") .HasColumnType("datetime(6)"); b.Property("UpdatedAt") .HasColumnType("datetime(6)"); b.HasKey("Id"); b.HasIndex("CategoryId"); b.HasIndex("ProductId"); b.ToTable("RankingHistories"); }); modelBuilder.Entity("HardwarePerformance.Core.Entities.Specification", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); b.Property("CreatedAt") .HasColumnType("datetime(6)"); b.Property("Key") .IsRequired() .HasMaxLength(100) .HasColumnType("varchar(100)"); b.Property("ProductId") .HasColumnType("int"); b.Property("Unit") .HasMaxLength(50) .HasColumnType("varchar(50)"); b.Property("Value") .IsRequired() .HasMaxLength(500) .HasColumnType("varchar(500)"); b.Property("UpdatedAt") .HasColumnType("datetime(6)"); b.HasKey("Id"); b.HasIndex("ProductId"); b.ToTable("Specifications"); }); modelBuilder.Entity("HardwarePerformance.Core.Entities.PerformanceScore", b => { b.HasOne("HardwarePerformance.Core.Entities.DataSource", "DataSource") .WithMany() .HasForeignKey("DataSourceId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("HardwarePerformance.Core.Entities.Product", "Product") .WithMany("PerformanceScores") .HasForeignKey("ProductId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("DataSource"); b.Navigation("Product"); }); modelBuilder.Entity("HardwarePerformance.Core.Entities.Product", b => { b.HasOne("HardwarePerformance.Core.Entities.Category", "Category") .WithMany("Products") .HasForeignKey("CategoryId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Category"); }); modelBuilder.Entity("HardwarePerformance.Core.Entities.RankingHistory", b => { b.HasOne("HardwarePerformance.Core.Entities.Category", "Category") .WithMany() .HasForeignKey("CategoryId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("HardwarePerformance.Core.Entities.Product", "Product") .WithMany("RankingHistories") .HasForeignKey("ProductId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Category"); b.Navigation("Product"); }); modelBuilder.Entity("HardwarePerformance.Core.Entities.Specification", b => { b.HasOne("HardwarePerformance.Core.Entities.Product", "Product") .WithMany("Specifications") .HasForeignKey("ProductId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Product"); }); modelBuilder.Entity("HardwarePerformance.Core.Entities.Category", b => { b.Navigation("Products"); }); modelBuilder.Entity("HardwarePerformance.Core.Entities.Product", b => { b.Navigation("PerformanceScores"); b.Navigation("RankingHistories"); b.Navigation("Specifications"); }); #pragma warning restore 612, 618 } } }