mirror of
https://gitlab.com/Hukuta47/cartrix.git
synced 2026-12-05 20:40:55 +00:00
88 lines
2.8 KiB
C#
88 lines
2.8 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("20260417022106_Init1")]
|
|
partial class Init1
|
|
{
|
|
/// <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.HasKey("Id");
|
|
|
|
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.HasKey("Id");
|
|
|
|
b.ToTable("Printers");
|
|
});
|
|
|
|
modelBuilder.Entity("CartridgePrinter", b =>
|
|
{
|
|
b.Property<int>("CartridgesHaveId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("CartridgesInPrinterId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.HasKey("CartridgesHaveId", "CartridgesInPrinterId");
|
|
|
|
b.HasIndex("CartridgesInPrinterId");
|
|
|
|
b.ToTable("CartridgePrinter");
|
|
});
|
|
|
|
modelBuilder.Entity("CartridgePrinter", b =>
|
|
{
|
|
b.HasOne("CartriX.Api.Models.Cartridge", null)
|
|
.WithMany()
|
|
.HasForeignKey("CartridgesHaveId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("CartriX.Api.Models.Printer", null)
|
|
.WithMany()
|
|
.HasForeignKey("CartridgesInPrinterId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|