123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381 |
- // <auto-generated />
- 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<int>("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
- b.Property<DateTime?>("ClearedTimeStamp")
- .HasColumnType("TEXT");
- b.Property<DateTime>("CreatedTimeStamp")
- .HasColumnType("TEXT");
- b.Property<string>("Description")
- .HasColumnType("TEXT");
- b.Property<int>("Priority")
- .HasColumnType("INTEGER");
- b.Property<byte>("TankNumber")
- .HasColumnType("INTEGER");
- b.Property<int>("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<int>("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
- b.Property<string>("Description")
- .HasColumnType("TEXT");
- b.Property<DateTime?>("EndingDateTime")
- .HasColumnType("TEXT");
- b.Property<double?>("EndingFuelHeight")
- .HasColumnType("REAL");
- b.Property<double?>("EndingFuelTCVolume")
- .HasColumnType("REAL");
- b.Property<double?>("EndingFuelVolume")
- .HasColumnType("REAL");
- b.Property<double?>("EndingTemperture")
- .HasColumnType("REAL");
- b.Property<double?>("EndingWaterHeight")
- .HasColumnType("REAL");
- b.Property<double?>("EndingWaterVolume")
- .HasColumnType("REAL");
- b.Property<DateTime>("StartingDateTime")
- .HasColumnType("TEXT");
- b.Property<double>("StartingFuelHeight")
- .HasColumnType("REAL");
- b.Property<double>("StartingFuelTCVolume")
- .HasColumnType("REAL");
- b.Property<double>("StartingFuelVolume")
- .HasColumnType("REAL");
- b.Property<double>("StartingTemperture")
- .HasColumnType("REAL");
- b.Property<double>("StartingWaterHeight")
- .HasColumnType("REAL");
- b.Property<double>("StartingWaterVolume")
- .HasColumnType("REAL");
- b.Property<byte>("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<int>("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
- b.Property<string>("Description")
- .HasColumnType("TEXT");
- b.Property<double>("FuelHeight")
- .HasColumnType("REAL");
- b.Property<double>("FuelTCVolume")
- .HasColumnType("REAL");
- b.Property<double>("FuelVolume")
- .HasColumnType("REAL");
- b.Property<int>("TankNumber")
- .HasColumnType("INTEGER");
- b.Property<double>("Temperture")
- .HasColumnType("REAL");
- b.Property<DateTime>("TimeStamp")
- .HasColumnType("TEXT");
- b.Property<double>("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<int>("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
- b.Property<DateTime>("CreatedTimeStamp")
- .HasColumnType("TEXT");
- b.Property<int>("DeviceId")
- .HasColumnType("INTEGER");
- b.Property<DateTime?>("ModifiedTimeStamp")
- .HasColumnType("TEXT");
- b.Property<double>("ProbeOffset")
- .HasColumnType("REAL");
- b.Property<double>("WaterOffset")
- .HasColumnType("REAL");
- b.HasKey("Id");
- b.ToTable("ProbeConfigs");
- });
- modelBuilder.Entity("Application.ATG_Classic_App.Model.ProductConfig", b =>
- {
- b.Property<int>("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
- b.Property<DateTime>("CreatedTimeStamp")
- .HasColumnType("TEXT");
- b.Property<DateTime?>("ModifiedTimeStamp")
- .HasColumnType("TEXT");
- b.Property<string>("ProductCode")
- .IsRequired()
- .HasColumnType("TEXT");
- b.Property<string>("ProductLabel")
- .HasColumnType("TEXT");
- b.HasKey("Id");
- b.ToTable("ProductConfigs");
- });
- modelBuilder.Entity("Application.ATG_Classic_App.Model.TankConfig", b =>
- {
- b.Property<int>("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
- b.Property<DateTime>("CreatedTimeStamp")
- .HasColumnType("TEXT");
- b.Property<int>("DeliveryDelay")
- .HasColumnType("INTEGER");
- b.Property<double>("Diameter")
- .HasColumnType("REAL");
- b.Property<string>("Label")
- .HasColumnType("TEXT");
- b.Property<DateTime?>("ModifiedTimeStamp")
- .HasColumnType("TEXT");
- b.Property<int?>("ProbeConfigId")
- .HasColumnType("INTEGER");
- b.Property<int?>("ProductConfigId")
- .HasColumnType("INTEGER");
- b.Property<int?>("TankLimitConfigId")
- .HasColumnType("INTEGER");
- b.Property<byte>("TankNumber")
- .HasColumnType("INTEGER");
- b.Property<double>("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<int>("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
- b.Property<DateTime>("CreatedTimeStamp")
- .HasColumnType("TEXT");
- b.Property<double>("FuelTemperatureHighLimit")
- .HasColumnType("REAL");
- b.Property<double>("FuelTemperatureLowLimit")
- .HasColumnType("REAL");
- b.Property<double>("FullVolume")
- .HasColumnType("REAL");
- b.Property<double>("HighProduct")
- .HasColumnType("REAL");
- b.Property<double>("HighWaterAlarm")
- .HasColumnType("REAL");
- b.Property<double>("HighWaterWarning")
- .HasColumnType("REAL");
- b.Property<double>("LowProduct")
- .HasColumnType("REAL");
- b.Property<double>("MaxVolume")
- .HasColumnType("REAL");
- b.Property<DateTime?>("ModifiedTimeStamp")
- .HasColumnType("TEXT");
- b.HasKey("Id");
- b.ToTable("TankLimitConfigs");
- });
- modelBuilder.Entity("Application.ATG_Classic_App.Model.TankOverallConfig", b =>
- {
- b.Property<int>("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
- b.Property<DateTime>("CreatedTimeStamp")
- .HasColumnType("TEXT");
- b.Property<int>("DeliveryMode")
- .HasColumnType("INTEGER");
- b.Property<int>("InventorySamplingInterval")
- .HasColumnType("INTEGER");
- b.Property<DateTime?>("ModifiedTimeStamp")
- .HasColumnType("TEXT");
- b.Property<double>("TcReference")
- .HasColumnType("REAL");
- b.HasKey("Id");
- b.ToTable("TankOverallConfigs");
- });
- modelBuilder.Entity("Application.ATG_Classic_App.Model.TankProfileData", b =>
- {
- b.Property<int>("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
- b.Property<string>("BatchLabel")
- .HasColumnType("TEXT");
- b.Property<double>("Height")
- .HasColumnType("REAL");
- b.Property<int>("TankConfigId")
- .HasColumnType("INTEGER");
- b.Property<double>("Volume")
- .HasColumnType("REAL");
- b.Property<double?>("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
- }
- }
- }
|