This commit is contained in:
Hukuta committed 2026-04-17 17:03:34 +09:00
1 parent a987494d29
commit 69e4c977cb
32 files changed
+721 -487

No files matched your search

@@ -25,8 +25,25 @@ namespace CartriX.Api.Migrations
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");
});
@@ -44,40 +61,112 @@ namespace CartriX.Api.Migrations
.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>("CartridgesHaveId")
b.Property<int>("SupportedCartridgeModelsId")
.HasColumnType("INTEGER");
b.Property<int>("CartridgesInPrinterId")
b.Property<int>("SupportedPrinterModelsId")
.HasColumnType("INTEGER");
b.HasKey("CartridgesHaveId", "CartridgesInPrinterId");
b.HasKey("SupportedCartridgeModelsId", "SupportedPrinterModelsId");
b.HasIndex("CartridgesInPrinterId");
b.HasIndex("SupportedPrinterModelsId");
b.ToTable("CartridgePrinter");
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("CartridgesHaveId")
.HasForeignKey("SupportedCartridgeModelsId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("CartriX.Api.Models.Printer", null)
.WithMany()
.HasForeignKey("CartridgesInPrinterId")
.HasForeignKey("SupportedPrinterModelsId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("CartriX.Api.Models.Printer", b =>
{
b.Navigation("CartridgesHave");
});
#pragma warning restore 612, 618
}
}