// using CartriX.Api; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable namespace CartriX.Api.Migrations { [DbContext(typeof(AppDbContext))] partial class AppDbContextModelSnapshot : ModelSnapshot { protected override void BuildModel(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") .HasColumnType("TEXT"); b.Property("PrinterConnectionTypeId") .HasColumnType("INTEGER"); b.Property("PrinterName") .IsRequired() .HasColumnType("TEXT"); b.Property("PrinterUsedPagesOID") .HasColumnType("TEXT"); b.Property("StatusId") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("PrinterConnectionTypeId"); b.HasIndex("StatusId"); b.ToTable("Printers"); }); modelBuilder.Entity("CartriX.Api.Models.PrinterConnectionType", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("Name") .IsRequired() .HasColumnType("TEXT"); b.HasKey("Id"); b.ToTable("PrinterConnectionType"); b.HasData( new { Id = 1, Name = "Network" }, new { Id = 2, Name = "USB" }); }); 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.PrinterConnectionType", "PrinterConnectionType") .WithMany() .HasForeignKey("PrinterConnectionTypeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("CartriX.Api.Models.StatusPrinter", "Status") .WithMany() .HasForeignKey("StatusId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("PrinterConnectionType"); b.Navigation("Status"); }); 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 } } }