mirror of
https://gitlab.com/Hukuta47/cartrix.git
synced 2026-12-05 04:20:55 +00:00
477 lines
16 KiB
C#
477 lines
16 KiB
C#
// <auto-generated />
|
||
using System;
|
||
using CartriX.Api.Classes;
|
||
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.7");
|
||
|
||
modelBuilder.Entity("CartriX.Api.Entities.Cartridge", b =>
|
||
{
|
||
b.Property<int>("id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("INTEGER");
|
||
|
||
b.Property<int>("countPrinted")
|
||
.HasColumnType("INTEGER");
|
||
|
||
b.Property<DateOnly?>("dateLastFilling")
|
||
.HasColumnType("TEXT");
|
||
|
||
b.Property<int?>("installedInPrinterid")
|
||
.HasColumnType("INTEGER");
|
||
|
||
b.Property<int>("maxCountPrint")
|
||
.HasColumnType("INTEGER");
|
||
|
||
b.Property<int>("modelid")
|
||
.HasColumnType("INTEGER");
|
||
|
||
b.Property<int>("statusId")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("INTEGER")
|
||
.HasDefaultValue(2);
|
||
|
||
b.HasKey("id");
|
||
|
||
b.HasIndex("installedInPrinterid");
|
||
|
||
b.HasIndex("modelid");
|
||
|
||
b.HasIndex("statusId");
|
||
|
||
b.ToTable("Cartridges");
|
||
});
|
||
|
||
modelBuilder.Entity("CartriX.Api.Entities.CartridgeArticle", b =>
|
||
{
|
||
b.Property<int>("id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("INTEGER");
|
||
|
||
b.Property<string>("name")
|
||
.IsRequired()
|
||
.HasColumnType("TEXT");
|
||
|
||
b.HasKey("id");
|
||
|
||
b.ToTable("СartridgeArticles");
|
||
});
|
||
|
||
modelBuilder.Entity("CartriX.Api.Entities.CartridgeModel", b =>
|
||
{
|
||
b.Property<int>("id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("INTEGER");
|
||
|
||
b.Property<int?>("manufacturerid")
|
||
.HasColumnType("INTEGER");
|
||
|
||
b.Property<string>("name")
|
||
.IsRequired()
|
||
.HasColumnType("TEXT");
|
||
|
||
b.HasKey("id");
|
||
|
||
b.HasIndex("manufacturerid");
|
||
|
||
b.ToTable("CartridgeModels");
|
||
});
|
||
|
||
modelBuilder.Entity("CartriX.Api.Entities.CartridgeStatus", b =>
|
||
{
|
||
b.Property<int>("id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("INTEGER");
|
||
|
||
b.Property<string>("name")
|
||
.IsRequired()
|
||
.HasColumnType("TEXT");
|
||
|
||
b.HasKey("id");
|
||
|
||
b.ToTable("CartridgeStatuses");
|
||
|
||
b.HasData(
|
||
new
|
||
{
|
||
id = 1,
|
||
name = "Installed"
|
||
},
|
||
new
|
||
{
|
||
id = 2,
|
||
name = "InStock"
|
||
},
|
||
new
|
||
{
|
||
id = 3,
|
||
name = "Refilling"
|
||
},
|
||
new
|
||
{
|
||
id = 4,
|
||
name = "InlineRefilling"
|
||
},
|
||
new
|
||
{
|
||
id = 5,
|
||
name = "UnderRepair"
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("CartriX.Api.Entities.ConnetctionType", b =>
|
||
{
|
||
b.Property<int>("id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("INTEGER");
|
||
|
||
b.Property<string>("name")
|
||
.IsRequired()
|
||
.HasColumnType("TEXT");
|
||
|
||
b.HasKey("id");
|
||
|
||
b.ToTable("СonnetctionTypes");
|
||
|
||
b.HasData(
|
||
new
|
||
{
|
||
id = 1,
|
||
name = "Network"
|
||
},
|
||
new
|
||
{
|
||
id = 2,
|
||
name = "USB"
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("CartriX.Api.Entities.Location", b =>
|
||
{
|
||
b.Property<int>("id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("INTEGER");
|
||
|
||
b.Property<string>("name")
|
||
.IsRequired()
|
||
.HasColumnType("TEXT");
|
||
|
||
b.HasKey("id");
|
||
|
||
b.HasIndex("name")
|
||
.IsUnique();
|
||
|
||
b.ToTable("Locations");
|
||
});
|
||
|
||
modelBuilder.Entity("CartriX.Api.Entities.LogPrinter", b =>
|
||
{
|
||
b.Property<int>("id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("INTEGER");
|
||
|
||
b.Property<int>("countPrinted")
|
||
.HasColumnType("INTEGER");
|
||
|
||
b.Property<DateTime>("date")
|
||
.HasColumnType("TEXT");
|
||
|
||
b.Property<int>("printerid")
|
||
.HasColumnType("INTEGER");
|
||
|
||
b.HasKey("id");
|
||
|
||
b.HasIndex("printerid");
|
||
|
||
b.ToTable("LogPrinters");
|
||
});
|
||
|
||
modelBuilder.Entity("CartriX.Api.Entities.Manufacturer", b =>
|
||
{
|
||
b.Property<int>("id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("INTEGER");
|
||
|
||
b.Property<string>("name")
|
||
.IsRequired()
|
||
.HasColumnType("TEXT");
|
||
|
||
b.HasKey("id");
|
||
|
||
b.ToTable("Manufacturers");
|
||
});
|
||
|
||
modelBuilder.Entity("CartriX.Api.Entities.PrintType", b =>
|
||
{
|
||
b.Property<int>("id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("INTEGER");
|
||
|
||
b.Property<string>("name")
|
||
.IsRequired()
|
||
.HasColumnType("TEXT");
|
||
|
||
b.HasKey("id");
|
||
|
||
b.ToTable("PrintTypes");
|
||
|
||
b.HasData(
|
||
new
|
||
{
|
||
id = 1,
|
||
name = "Laser"
|
||
},
|
||
new
|
||
{
|
||
id = 2,
|
||
name = "Inkjet"
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("CartriX.Api.Entities.Printer", b =>
|
||
{
|
||
b.Property<int>("id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("INTEGER");
|
||
|
||
b.Property<int>("connetctionTypeid")
|
||
.HasColumnType("INTEGER");
|
||
|
||
b.Property<int>("countPrintedAllTime")
|
||
.HasColumnType("INTEGER");
|
||
|
||
b.Property<string>("hostname")
|
||
.HasColumnType("TEXT");
|
||
|
||
b.Property<string>("ipAddress")
|
||
.HasColumnType("TEXT");
|
||
|
||
b.Property<int>("locationid")
|
||
.HasColumnType("INTEGER");
|
||
|
||
b.Property<int>("modelid")
|
||
.HasColumnType("INTEGER");
|
||
|
||
b.Property<string>("name")
|
||
.IsRequired()
|
||
.HasColumnType("TEXT");
|
||
|
||
b.Property<string>("oidForQueryCountPrintedAllTime")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("TEXT")
|
||
.HasDefaultValue("1.3.6.1.2.1.43.10.2.1.4.1.1");
|
||
|
||
b.Property<int>("printTypeId")
|
||
.HasColumnType("INTEGER");
|
||
|
||
b.HasKey("id");
|
||
|
||
b.HasIndex("connetctionTypeid");
|
||
|
||
b.HasIndex("locationid");
|
||
|
||
b.HasIndex("modelid");
|
||
|
||
b.HasIndex("printTypeId");
|
||
|
||
b.ToTable("Printers");
|
||
});
|
||
|
||
modelBuilder.Entity("CartriX.Api.Entities.PrinterModel", b =>
|
||
{
|
||
b.Property<int>("id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("INTEGER");
|
||
|
||
b.Property<int?>("manufacturerid")
|
||
.HasColumnType("INTEGER");
|
||
|
||
b.Property<string>("name")
|
||
.IsRequired()
|
||
.HasColumnType("TEXT");
|
||
|
||
b.Property<string>("picturePath")
|
||
.HasColumnType("TEXT");
|
||
|
||
b.HasKey("id");
|
||
|
||
b.HasIndex("manufacturerid");
|
||
|
||
b.ToTable("PrinterModels");
|
||
});
|
||
|
||
modelBuilder.Entity("CartridgeArticleCartridgeModel", b =>
|
||
{
|
||
b.Property<int>("Articlesid")
|
||
.HasColumnType("INTEGER");
|
||
|
||
b.Property<int>("CartridgeModelid")
|
||
.HasColumnType("INTEGER");
|
||
|
||
b.HasKey("Articlesid", "CartridgeModelid");
|
||
|
||
b.HasIndex("CartridgeModelid");
|
||
|
||
b.ToTable("printerModel_cartridgeArticles", (string)null);
|
||
});
|
||
|
||
modelBuilder.Entity("CartridgeArticlePrinterModel", b =>
|
||
{
|
||
b.Property<int>("PrinterModelid")
|
||
.HasColumnType("INTEGER");
|
||
|
||
b.Property<int>("SupportedArticlesid")
|
||
.HasColumnType("INTEGER");
|
||
|
||
b.HasKey("PrinterModelid", "SupportedArticlesid");
|
||
|
||
b.HasIndex("SupportedArticlesid");
|
||
|
||
b.ToTable("CartridgeArticlePrinterModel");
|
||
});
|
||
|
||
modelBuilder.Entity("CartriX.Api.Entities.Cartridge", b =>
|
||
{
|
||
b.HasOne("CartriX.Api.Entities.Printer", "installedInPrinter")
|
||
.WithMany("installedCartridges")
|
||
.HasForeignKey("installedInPrinterid");
|
||
|
||
b.HasOne("CartriX.Api.Entities.CartridgeModel", "model")
|
||
.WithMany()
|
||
.HasForeignKey("modelid")
|
||
.OnDelete(DeleteBehavior.Cascade)
|
||
.IsRequired();
|
||
|
||
b.HasOne("CartriX.Api.Entities.CartridgeStatus", "status")
|
||
.WithMany()
|
||
.HasForeignKey("statusId")
|
||
.OnDelete(DeleteBehavior.Cascade)
|
||
.IsRequired();
|
||
|
||
b.Navigation("installedInPrinter");
|
||
|
||
b.Navigation("model");
|
||
|
||
b.Navigation("status");
|
||
});
|
||
|
||
modelBuilder.Entity("CartriX.Api.Entities.CartridgeModel", b =>
|
||
{
|
||
b.HasOne("CartriX.Api.Entities.Manufacturer", "manufacturer")
|
||
.WithMany()
|
||
.HasForeignKey("manufacturerid");
|
||
|
||
b.Navigation("manufacturer");
|
||
});
|
||
|
||
modelBuilder.Entity("CartriX.Api.Entities.LogPrinter", b =>
|
||
{
|
||
b.HasOne("CartriX.Api.Entities.Printer", "printer")
|
||
.WithMany()
|
||
.HasForeignKey("printerid")
|
||
.OnDelete(DeleteBehavior.Cascade)
|
||
.IsRequired();
|
||
|
||
b.Navigation("printer");
|
||
});
|
||
|
||
modelBuilder.Entity("CartriX.Api.Entities.Printer", b =>
|
||
{
|
||
b.HasOne("CartriX.Api.Entities.ConnetctionType", "connetctionType")
|
||
.WithMany()
|
||
.HasForeignKey("connetctionTypeid")
|
||
.OnDelete(DeleteBehavior.Cascade)
|
||
.IsRequired();
|
||
|
||
b.HasOne("CartriX.Api.Entities.Location", "location")
|
||
.WithMany("printers")
|
||
.HasForeignKey("locationid")
|
||
.OnDelete(DeleteBehavior.Cascade)
|
||
.IsRequired();
|
||
|
||
b.HasOne("CartriX.Api.Entities.PrinterModel", "model")
|
||
.WithMany()
|
||
.HasForeignKey("modelid")
|
||
.OnDelete(DeleteBehavior.Cascade)
|
||
.IsRequired();
|
||
|
||
b.HasOne("CartriX.Api.Entities.PrintType", "printType")
|
||
.WithMany()
|
||
.HasForeignKey("printTypeId")
|
||
.OnDelete(DeleteBehavior.Cascade)
|
||
.IsRequired();
|
||
|
||
b.Navigation("connetctionType");
|
||
|
||
b.Navigation("location");
|
||
|
||
b.Navigation("model");
|
||
|
||
b.Navigation("printType");
|
||
});
|
||
|
||
modelBuilder.Entity("CartriX.Api.Entities.PrinterModel", b =>
|
||
{
|
||
b.HasOne("CartriX.Api.Entities.Manufacturer", "manufacturer")
|
||
.WithMany()
|
||
.HasForeignKey("manufacturerid");
|
||
|
||
b.Navigation("manufacturer");
|
||
});
|
||
|
||
modelBuilder.Entity("CartridgeArticleCartridgeModel", b =>
|
||
{
|
||
b.HasOne("CartriX.Api.Entities.CartridgeArticle", null)
|
||
.WithMany()
|
||
.HasForeignKey("Articlesid")
|
||
.OnDelete(DeleteBehavior.Cascade)
|
||
.IsRequired();
|
||
|
||
b.HasOne("CartriX.Api.Entities.CartridgeModel", null)
|
||
.WithMany()
|
||
.HasForeignKey("CartridgeModelid")
|
||
.OnDelete(DeleteBehavior.Cascade)
|
||
.IsRequired();
|
||
});
|
||
|
||
modelBuilder.Entity("CartridgeArticlePrinterModel", b =>
|
||
{
|
||
b.HasOne("CartriX.Api.Entities.PrinterModel", null)
|
||
.WithMany()
|
||
.HasForeignKey("PrinterModelid")
|
||
.OnDelete(DeleteBehavior.Cascade)
|
||
.IsRequired();
|
||
|
||
b.HasOne("CartriX.Api.Entities.CartridgeArticle", null)
|
||
.WithMany()
|
||
.HasForeignKey("SupportedArticlesid")
|
||
.OnDelete(DeleteBehavior.Cascade)
|
||
.IsRequired();
|
||
});
|
||
|
||
modelBuilder.Entity("CartriX.Api.Entities.Location", b =>
|
||
{
|
||
b.Navigation("printers");
|
||
});
|
||
|
||
modelBuilder.Entity("CartriX.Api.Entities.Printer", b =>
|
||
{
|
||
b.Navigation("installedCartridges");
|
||
});
|
||
#pragma warning restore 612, 618
|
||
}
|
||
}
|
||
}
|