281 lines
9.4 KiB
C#
281 lines
9.4 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using FSI.BT.IR.Plc.Settings.Log.Data;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
|
|
#nullable disable
|
|
|
|
namespace FSI.BT.IR.Plc.Settings.Log.Data.Migrations
|
|
{
|
|
[DbContext(typeof(ApplicationDbContext))]
|
|
[Migration("20241018090345_InitialCreate")]
|
|
partial class InitialCreate
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder.HasAnnotation("ProductVersion", "8.0.10");
|
|
|
|
modelBuilder.Entity("FSI.BT.IR.Plc.Settings.Log.Models.Logging", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("ParameterId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<DateTime>("Timestamp")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Value")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("ParameterId");
|
|
|
|
b.ToTable("Logging");
|
|
});
|
|
|
|
modelBuilder.Entity("FSI.BT.IR.Plc.Settings.Log.Models.Organization", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<DateTime>("Created")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Description")
|
|
.HasMaxLength(255)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("FullShortName")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(30)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int?>("ParameterId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int?>("ParentId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int?>("PlcId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("ShortName")
|
|
.IsRequired()
|
|
.HasMaxLength(10)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int>("Type")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<DateTime>("Updated")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("ParameterId");
|
|
|
|
b.HasIndex("PlcId");
|
|
|
|
b.ToTable("Organizations");
|
|
});
|
|
|
|
modelBuilder.Entity("FSI.BT.IR.Plc.Settings.Log.Models.Parameter", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<DateTime>("Created")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int>("DataType")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("DbNo")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("DbSize")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("DbStart")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("DefaultValue")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Description")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<bool>("Disabled")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int>("OrganizationId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("PlcId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<DateTime>("Updated")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("OrganizationId");
|
|
|
|
b.HasIndex("PlcId");
|
|
|
|
b.ToTable("Parameters");
|
|
});
|
|
|
|
modelBuilder.Entity("FSI.BT.IR.Plc.Settings.Log.Models.Plc", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<DateTime>("Created")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Description")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<bool>("Disabled")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("IpAdress")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int>("OrganizationId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int?>("ParameterId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("Rack")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("Slot")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<DateTime>("Updated")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("OrganizationId");
|
|
|
|
b.HasIndex("ParameterId");
|
|
|
|
b.ToTable("Plcs");
|
|
});
|
|
|
|
modelBuilder.Entity("FSI.BT.IR.Plc.Settings.Log.Models.Logging", b =>
|
|
{
|
|
b.HasOne("FSI.BT.IR.Plc.Settings.Log.Models.Parameter", "Parameter")
|
|
.WithMany()
|
|
.HasForeignKey("ParameterId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Parameter");
|
|
});
|
|
|
|
modelBuilder.Entity("FSI.BT.IR.Plc.Settings.Log.Models.Organization", b =>
|
|
{
|
|
b.HasOne("FSI.BT.IR.Plc.Settings.Log.Models.Organization", "Parent")
|
|
.WithMany("Parents")
|
|
.HasForeignKey("Id")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("FSI.BT.IR.Plc.Settings.Log.Models.Parameter", null)
|
|
.WithMany("Organizations")
|
|
.HasForeignKey("ParameterId");
|
|
|
|
b.HasOne("FSI.BT.IR.Plc.Settings.Log.Models.Plc", null)
|
|
.WithMany("Organizations")
|
|
.HasForeignKey("PlcId");
|
|
|
|
b.Navigation("Parent");
|
|
});
|
|
|
|
modelBuilder.Entity("FSI.BT.IR.Plc.Settings.Log.Models.Parameter", b =>
|
|
{
|
|
b.HasOne("FSI.BT.IR.Plc.Settings.Log.Models.Organization", "Organization")
|
|
.WithMany()
|
|
.HasForeignKey("OrganizationId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("FSI.BT.IR.Plc.Settings.Log.Models.Plc", "Plc")
|
|
.WithMany()
|
|
.HasForeignKey("PlcId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Organization");
|
|
|
|
b.Navigation("Plc");
|
|
});
|
|
|
|
modelBuilder.Entity("FSI.BT.IR.Plc.Settings.Log.Models.Plc", b =>
|
|
{
|
|
b.HasOne("FSI.BT.IR.Plc.Settings.Log.Models.Organization", "Organization")
|
|
.WithMany()
|
|
.HasForeignKey("OrganizationId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("FSI.BT.IR.Plc.Settings.Log.Models.Parameter", null)
|
|
.WithMany("Plcs")
|
|
.HasForeignKey("ParameterId");
|
|
|
|
b.Navigation("Organization");
|
|
});
|
|
|
|
modelBuilder.Entity("FSI.BT.IR.Plc.Settings.Log.Models.Organization", b =>
|
|
{
|
|
b.Navigation("Parents");
|
|
});
|
|
|
|
modelBuilder.Entity("FSI.BT.IR.Plc.Settings.Log.Models.Parameter", b =>
|
|
{
|
|
b.Navigation("Organizations");
|
|
|
|
b.Navigation("Plcs");
|
|
});
|
|
|
|
modelBuilder.Entity("FSI.BT.IR.Plc.Settings.Log.Models.Plc", b =>
|
|
{
|
|
b.Navigation("Organizations");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|