// using CartriX.Api; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable namespace CartriX.Api.Migrations { [DbContext(typeof(AppDbContext))] [Migration("20260417124605_Init5")] partial class Init5 { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "10.0.6"); modelBuilder.Entity("CartriX.Api.Models.Cartridge", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("Capacity") .HasColumnType("INTEGER"); b.Property("InPrinterId") .HasColumnType("INTEGER"); b.Property("Model") .IsRequired() .HasColumnType("TEXT"); b.Property("StatusId") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("InPrinterId"); b.HasIndex("StatusId"); b.ToTable("Cartridges"); }); modelBuilder.Entity("CartriX.Api.Models.Printer", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("IpAddress") .IsRequired() .HasColumnType("TEXT"); b.Property("PrinterName") .IsRequired() .HasColumnType("TEXT"); b.Property("StautsId") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("StautsId"); b.ToTable("Printers"); }); modelBuilder.Entity("CartriX.Api.Models.StatusCartridge", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("Name") .IsRequired() .HasColumnType("TEXT"); b.HasKey("Id"); b.ToTable("StatusCartridges"); }); modelBuilder.Entity("CartriX.Api.Models.StatusPrinter", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("Name") .IsRequired() .HasColumnType("TEXT"); b.HasKey("Id"); b.ToTable("StatusPrinters"); }); modelBuilder.Entity("CartridgePrinter", b => { b.Property("SupportCartridgeModelsId") .HasColumnType("INTEGER"); b.Property("SupportPrinterModelsId") .HasColumnType("INTEGER"); b.HasKey("SupportCartridgeModelsId", "SupportPrinterModelsId"); b.HasIndex("SupportPrinterModelsId"); b.ToTable("CartridgeCapabilityPrinters", (string)null); }); modelBuilder.Entity("CartriX.Api.Models.Cartridge", b => { b.HasOne("CartriX.Api.Models.Printer", "InPrinter") .WithMany("CartridgesHave") .HasForeignKey("InPrinterId") .OnDelete(DeleteBehavior.Restrict); b.HasOne("CartriX.Api.Models.StatusCartridge", "Status") .WithMany() .HasForeignKey("StatusId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("InPrinter"); b.Navigation("Status"); }); modelBuilder.Entity("CartriX.Api.Models.Printer", b => { b.HasOne("CartriX.Api.Models.StatusPrinter", "Stauts") .WithMany() .HasForeignKey("StautsId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Stauts"); }); modelBuilder.Entity("CartridgePrinter", b => { b.HasOne("CartriX.Api.Models.Cartridge", null) .WithMany() .HasForeignKey("SupportCartridgeModelsId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("CartriX.Api.Models.Printer", null) .WithMany() .HasForeignKey("SupportPrinterModelsId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("CartriX.Api.Models.Printer", b => { b.Navigation("CartridgesHave"); }); #pragma warning restore 612, 618 } } }