// using System; using Application.ATG_Classic_App; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; namespace Application.ATG_Classic_App.Migrations { [DbContext(typeof(AppDbContext))] [Migration("20200522082859_init")] partial class init { protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "3.1.4"); modelBuilder.Entity("Application.ATG_Classic_App.Model.Alarm", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("ClearedTimeStamp") .HasColumnType("TEXT"); b.Property("CreatedTimeStamp") .HasColumnType("TEXT"); b.Property("Description") .HasColumnType("TEXT"); b.Property("Priority") .HasColumnType("INTEGER"); b.Property("TankNumber") .HasColumnType("INTEGER"); b.Property("Type") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("CreatedTimeStamp"); b.HasIndex("TankNumber"); b.HasIndex("TankNumber", "Type", "Priority", "ClearedTimeStamp") .IsUnique(); b.HasIndex("TankNumber", "Type", "Priority", "CreatedTimeStamp") .IsUnique(); b.ToTable("Alarms"); }); modelBuilder.Entity("Application.ATG_Classic_App.Model.Delivery", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("Description") .HasColumnType("TEXT"); b.Property("EndingDateTime") .HasColumnType("TEXT"); b.Property("EndingFuelHeight") .HasColumnType("REAL"); b.Property("EndingFuelTCVolume") .HasColumnType("REAL"); b.Property("EndingFuelVolume") .HasColumnType("REAL"); b.Property("EndingTemperture") .HasColumnType("REAL"); b.Property("EndingWaterHeight") .HasColumnType("REAL"); b.Property("EndingWaterVolume") .HasColumnType("REAL"); b.Property("StartingDateTime") .HasColumnType("TEXT"); b.Property("StartingFuelHeight") .HasColumnType("REAL"); b.Property("StartingFuelTCVolume") .HasColumnType("REAL"); b.Property("StartingFuelVolume") .HasColumnType("REAL"); b.Property("StartingTemperture") .HasColumnType("REAL"); b.Property("StartingWaterHeight") .HasColumnType("REAL"); b.Property("StartingWaterVolume") .HasColumnType("REAL"); b.Property("TankNumber") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("TankNumber", "StartingDateTime") .IsUnique(); b.ToTable("Deliveries"); }); modelBuilder.Entity("Application.ATG_Classic_App.Model.Inventory", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("Description") .HasColumnType("TEXT"); b.Property("FuelHeight") .HasColumnType("REAL"); b.Property("FuelTCVolume") .HasColumnType("REAL"); b.Property("FuelVolume") .HasColumnType("REAL"); b.Property("TankNumber") .HasColumnType("INTEGER"); b.Property("Temperture") .HasColumnType("REAL"); b.Property("TimeStamp") .HasColumnType("TEXT"); b.Property("WaterHeight") .HasColumnType("REAL"); b.HasKey("Id"); b.HasIndex("TankNumber", "TimeStamp") .IsUnique(); b.ToTable("Inventories"); }); modelBuilder.Entity("Application.ATG_Classic_App.Model.ProbeConfig", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("CreatedTimeStamp") .HasColumnType("TEXT"); b.Property("DeviceId") .HasColumnType("INTEGER"); b.Property("ModifiedTimeStamp") .HasColumnType("TEXT"); b.Property("ProbeOffset") .HasColumnType("REAL"); b.Property("WaterOffset") .HasColumnType("REAL"); b.HasKey("Id"); b.ToTable("ProbeConfigs"); }); modelBuilder.Entity("Application.ATG_Classic_App.Model.ProductConfig", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("CreatedTimeStamp") .HasColumnType("TEXT"); b.Property("ModifiedTimeStamp") .HasColumnType("TEXT"); b.Property("ProductCode") .IsRequired() .HasColumnType("TEXT"); b.Property("ProductLabel") .HasColumnType("TEXT"); b.HasKey("Id"); b.ToTable("ProductConfigs"); }); modelBuilder.Entity("Application.ATG_Classic_App.Model.TankConfig", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("CreatedTimeStamp") .HasColumnType("TEXT"); b.Property("DeliveryDelay") .HasColumnType("INTEGER"); b.Property("Diameter") .HasColumnType("REAL"); b.Property("Label") .HasColumnType("TEXT"); b.Property("ModifiedTimeStamp") .HasColumnType("TEXT"); b.Property("ProbeConfigId") .HasColumnType("INTEGER"); b.Property("ProductConfigId") .HasColumnType("INTEGER"); b.Property("TankLimitConfigId") .HasColumnType("INTEGER"); b.Property("TankNumber") .HasColumnType("INTEGER"); b.Property("ThermalCoefficient") .HasColumnType("REAL"); b.HasKey("Id"); b.HasIndex("ProbeConfigId"); b.HasIndex("ProductConfigId"); b.HasIndex("TankLimitConfigId"); b.ToTable("TankConfigs"); }); modelBuilder.Entity("Application.ATG_Classic_App.Model.TankLimitConfig", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("CreatedTimeStamp") .HasColumnType("TEXT"); b.Property("FuelTemperatureHighLimit") .HasColumnType("REAL"); b.Property("FuelTemperatureLowLimit") .HasColumnType("REAL"); b.Property("FullVolume") .HasColumnType("REAL"); b.Property("HighProduct") .HasColumnType("REAL"); b.Property("HighWaterAlarm") .HasColumnType("REAL"); b.Property("HighWaterWarning") .HasColumnType("REAL"); b.Property("LowProduct") .HasColumnType("REAL"); b.Property("MaxVolume") .HasColumnType("REAL"); b.Property("ModifiedTimeStamp") .HasColumnType("TEXT"); b.HasKey("Id"); b.ToTable("TankLimitConfigs"); }); modelBuilder.Entity("Application.ATG_Classic_App.Model.TankOverallConfig", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("CreatedTimeStamp") .HasColumnType("TEXT"); b.Property("DeliveryMode") .HasColumnType("INTEGER"); b.Property("InventorySamplingInterval") .HasColumnType("INTEGER"); b.Property("ModifiedTimeStamp") .HasColumnType("TEXT"); b.Property("TcReference") .HasColumnType("REAL"); b.HasKey("Id"); b.ToTable("TankOverallConfigs"); }); modelBuilder.Entity("Application.ATG_Classic_App.Model.TankProfileData", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("BatchLabel") .HasColumnType("TEXT"); b.Property("Height") .HasColumnType("REAL"); b.Property("TankConfigId") .HasColumnType("INTEGER"); b.Property("Volume") .HasColumnType("REAL"); b.Property("VolumeChange") .HasColumnType("REAL"); b.HasKey("Id"); b.HasIndex("TankConfigId"); b.HasIndex("BatchLabel", "Height") .IsUnique(); b.ToTable("TankProfileDatas"); }); modelBuilder.Entity("Application.ATG_Classic_App.Model.TankConfig", b => { b.HasOne("Application.ATG_Classic_App.Model.ProbeConfig", "ProbeConfig") .WithMany() .HasForeignKey("ProbeConfigId"); b.HasOne("Application.ATG_Classic_App.Model.ProductConfig", "ProductConfig") .WithMany() .HasForeignKey("ProductConfigId"); b.HasOne("Application.ATG_Classic_App.Model.TankLimitConfig", "TankLimitConfig") .WithMany() .HasForeignKey("TankLimitConfigId"); }); modelBuilder.Entity("Application.ATG_Classic_App.Model.TankProfileData", b => { b.HasOne("Application.ATG_Classic_App.Model.TankConfig", "TankConfig") .WithMany("TankProfileDatas") .HasForeignKey("TankConfigId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); #pragma warning restore 612, 618 } } }