mirror of
https://gitlab.com/Hukuta47/cartrix.git
synced 2026-12-05 20:40:55 +00:00
Сделал диалоговое окно добавления принтера
This commit is contained in:
1 parent
17e4794160
commit
88f53c793e
78 files changed
+854
-60572
No files matched your search
+213
@@ -0,0 +1,213 @@
|
||||
// <auto-generated />
|
||||
using CartriX.Shared.Classes;
|
||||
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("20260507131711_Init3")]
|
||||
partial class Init3
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "10.0.7");
|
||||
|
||||
modelBuilder.Entity("CartriX.Shared.Models.Cartridge", b =>
|
||||
{
|
||||
b.Property<int>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("countPrinted")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int?>("installedInPrinterid")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("modelid")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("installedInPrinterid");
|
||||
|
||||
b.HasIndex("modelid");
|
||||
|
||||
b.ToTable("Cartridges");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CartriX.Shared.Models.CartridgeModel", b =>
|
||||
{
|
||||
b.Property<int>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("name")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("CartridgeModels");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CartriX.Shared.Models.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.Shared.Models.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.Shared.Models.Printer", b =>
|
||||
{
|
||||
b.Property<int>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("hostname")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("ipAddress")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("locationid")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("modelid")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("name")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("printTypeid")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("locationid");
|
||||
|
||||
b.HasIndex("modelid");
|
||||
|
||||
b.HasIndex("printTypeid");
|
||||
|
||||
b.ToTable("Printers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CartriX.Shared.Models.PrinterModel", b =>
|
||||
{
|
||||
b.Property<int>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("name")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("picturePath")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("PrinterModels");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CartriX.Shared.Models.Cartridge", b =>
|
||||
{
|
||||
b.HasOne("CartriX.Shared.Models.Printer", "installedInPrinter")
|
||||
.WithMany()
|
||||
.HasForeignKey("installedInPrinterid");
|
||||
|
||||
b.HasOne("CartriX.Shared.Models.CartridgeModel", "model")
|
||||
.WithMany()
|
||||
.HasForeignKey("modelid")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("installedInPrinter");
|
||||
|
||||
b.Navigation("model");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CartriX.Shared.Models.Printer", b =>
|
||||
{
|
||||
b.HasOne("CartriX.Shared.Models.Location", "location")
|
||||
.WithMany("printers")
|
||||
.HasForeignKey("locationid")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("CartriX.Shared.Models.PrinterModel", "model")
|
||||
.WithMany()
|
||||
.HasForeignKey("modelid")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("CartriX.Shared.Models.PrintType", "printType")
|
||||
.WithMany()
|
||||
.HasForeignKey("printTypeid")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("location");
|
||||
|
||||
b.Navigation("model");
|
||||
|
||||
b.Navigation("printType");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CartriX.Shared.Models.Location", b =>
|
||||
{
|
||||
b.Navigation("printers");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user