Files
CartriX/CartriX.Api/Migrations/20260417124737_Init6.Designer.cs
T

171 lines
5.5 KiB
C#

// <auto-generated />
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("20260417124737_Init6")]
partial class Init6
{
/// <inheritdoc />
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<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<int>("Capacity")
.HasColumnType("INTEGER");
b.Property<int?>("InPrinterId")
.HasColumnType("INTEGER");
b.Property<string>("Model")
.IsRequired()
.HasColumnType("TEXT");
b.Property<int>("StatusId")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("InPrinterId");
b.HasIndex("StatusId");
b.ToTable("Cartridges");
});
modelBuilder.Entity("CartriX.Api.Models.Printer", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("IpAddress")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("PrinterName")
.IsRequired()
.HasColumnType("TEXT");
b.Property<int>("StatusId")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("StatusId");
b.ToTable("Printers");
});
modelBuilder.Entity("CartriX.Api.Models.StatusCartridge", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("StatusCartridges");
});
modelBuilder.Entity("CartriX.Api.Models.StatusPrinter", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("StatusPrinters");
});
modelBuilder.Entity("CartridgePrinter", b =>
{
b.Property<int>("SupportCartridgeModelsId")
.HasColumnType("INTEGER");
b.Property<int>("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", "Status")
.WithMany()
.HasForeignKey("StatusId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
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
}
}
}