Files
CartriX/CartriX.Api/Migrations/AppDbContextModelSnapshot.cs
T
2026-04-17 17:03:34 +09:00

174 lines
5.7 KiB
C#

// <auto-generated />
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<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.Property<int>("StautsId")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("InPrinterId");
b.HasIndex("StautsId");
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.Property<int>("StautsId")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("StautsId");
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>("SupportedCartridgeModelsId")
.HasColumnType("INTEGER");
b.Property<int>("SupportedPrinterModelsId")
.HasColumnType("INTEGER");
b.HasKey("SupportedCartridgeModelsId", "SupportedPrinterModelsId");
b.HasIndex("SupportedPrinterModelsId");
b.ToTable("CartridgeSupportedPrinters", (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", "Stauts")
.WithMany()
.HasForeignKey("StautsId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("InPrinter");
b.Navigation("Stauts");
});
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("SupportedCartridgeModelsId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("CartriX.Api.Models.Printer", null)
.WithMany()
.HasForeignKey("SupportedPrinterModelsId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("CartriX.Api.Models.Printer", b =>
{
b.Navigation("CartridgesHave");
});
#pragma warning restore 612, 618
}
}
}