20200522082859_init.Designer.cs 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381
  1. // <auto-generated />
  2. using System;
  3. using Application.ATG_Classic_App;
  4. using Microsoft.EntityFrameworkCore;
  5. using Microsoft.EntityFrameworkCore.Infrastructure;
  6. using Microsoft.EntityFrameworkCore.Migrations;
  7. using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
  8. namespace Application.ATG_Classic_App.Migrations
  9. {
  10. [DbContext(typeof(AppDbContext))]
  11. [Migration("20200522082859_init")]
  12. partial class init
  13. {
  14. protected override void BuildTargetModel(ModelBuilder modelBuilder)
  15. {
  16. #pragma warning disable 612, 618
  17. modelBuilder
  18. .HasAnnotation("ProductVersion", "3.1.4");
  19. modelBuilder.Entity("Application.ATG_Classic_App.Model.Alarm", b =>
  20. {
  21. b.Property<int>("Id")
  22. .ValueGeneratedOnAdd()
  23. .HasColumnType("INTEGER");
  24. b.Property<DateTime?>("ClearedTimeStamp")
  25. .HasColumnType("TEXT");
  26. b.Property<DateTime>("CreatedTimeStamp")
  27. .HasColumnType("TEXT");
  28. b.Property<string>("Description")
  29. .HasColumnType("TEXT");
  30. b.Property<int>("Priority")
  31. .HasColumnType("INTEGER");
  32. b.Property<byte>("TankNumber")
  33. .HasColumnType("INTEGER");
  34. b.Property<int>("Type")
  35. .HasColumnType("INTEGER");
  36. b.HasKey("Id");
  37. b.HasIndex("CreatedTimeStamp");
  38. b.HasIndex("TankNumber");
  39. b.HasIndex("TankNumber", "Type", "Priority", "ClearedTimeStamp")
  40. .IsUnique();
  41. b.HasIndex("TankNumber", "Type", "Priority", "CreatedTimeStamp")
  42. .IsUnique();
  43. b.ToTable("Alarms");
  44. });
  45. modelBuilder.Entity("Application.ATG_Classic_App.Model.Delivery", b =>
  46. {
  47. b.Property<int>("Id")
  48. .ValueGeneratedOnAdd()
  49. .HasColumnType("INTEGER");
  50. b.Property<string>("Description")
  51. .HasColumnType("TEXT");
  52. b.Property<DateTime?>("EndingDateTime")
  53. .HasColumnType("TEXT");
  54. b.Property<double?>("EndingFuelHeight")
  55. .HasColumnType("REAL");
  56. b.Property<double?>("EndingFuelTCVolume")
  57. .HasColumnType("REAL");
  58. b.Property<double?>("EndingFuelVolume")
  59. .HasColumnType("REAL");
  60. b.Property<double?>("EndingTemperture")
  61. .HasColumnType("REAL");
  62. b.Property<double?>("EndingWaterHeight")
  63. .HasColumnType("REAL");
  64. b.Property<double?>("EndingWaterVolume")
  65. .HasColumnType("REAL");
  66. b.Property<DateTime>("StartingDateTime")
  67. .HasColumnType("TEXT");
  68. b.Property<double>("StartingFuelHeight")
  69. .HasColumnType("REAL");
  70. b.Property<double>("StartingFuelTCVolume")
  71. .HasColumnType("REAL");
  72. b.Property<double>("StartingFuelVolume")
  73. .HasColumnType("REAL");
  74. b.Property<double>("StartingTemperture")
  75. .HasColumnType("REAL");
  76. b.Property<double>("StartingWaterHeight")
  77. .HasColumnType("REAL");
  78. b.Property<double>("StartingWaterVolume")
  79. .HasColumnType("REAL");
  80. b.Property<byte>("TankNumber")
  81. .HasColumnType("INTEGER");
  82. b.HasKey("Id");
  83. b.HasIndex("TankNumber", "StartingDateTime")
  84. .IsUnique();
  85. b.ToTable("Deliveries");
  86. });
  87. modelBuilder.Entity("Application.ATG_Classic_App.Model.Inventory", b =>
  88. {
  89. b.Property<int>("Id")
  90. .ValueGeneratedOnAdd()
  91. .HasColumnType("INTEGER");
  92. b.Property<string>("Description")
  93. .HasColumnType("TEXT");
  94. b.Property<double>("FuelHeight")
  95. .HasColumnType("REAL");
  96. b.Property<double>("FuelTCVolume")
  97. .HasColumnType("REAL");
  98. b.Property<double>("FuelVolume")
  99. .HasColumnType("REAL");
  100. b.Property<int>("TankNumber")
  101. .HasColumnType("INTEGER");
  102. b.Property<double>("Temperture")
  103. .HasColumnType("REAL");
  104. b.Property<DateTime>("TimeStamp")
  105. .HasColumnType("TEXT");
  106. b.Property<double>("WaterHeight")
  107. .HasColumnType("REAL");
  108. b.HasKey("Id");
  109. b.HasIndex("TankNumber", "TimeStamp")
  110. .IsUnique();
  111. b.ToTable("Inventories");
  112. });
  113. modelBuilder.Entity("Application.ATG_Classic_App.Model.ProbeConfig", b =>
  114. {
  115. b.Property<int>("Id")
  116. .ValueGeneratedOnAdd()
  117. .HasColumnType("INTEGER");
  118. b.Property<DateTime>("CreatedTimeStamp")
  119. .HasColumnType("TEXT");
  120. b.Property<int>("DeviceId")
  121. .HasColumnType("INTEGER");
  122. b.Property<DateTime?>("ModifiedTimeStamp")
  123. .HasColumnType("TEXT");
  124. b.Property<double>("ProbeOffset")
  125. .HasColumnType("REAL");
  126. b.Property<double>("WaterOffset")
  127. .HasColumnType("REAL");
  128. b.HasKey("Id");
  129. b.ToTable("ProbeConfigs");
  130. });
  131. modelBuilder.Entity("Application.ATG_Classic_App.Model.ProductConfig", b =>
  132. {
  133. b.Property<int>("Id")
  134. .ValueGeneratedOnAdd()
  135. .HasColumnType("INTEGER");
  136. b.Property<DateTime>("CreatedTimeStamp")
  137. .HasColumnType("TEXT");
  138. b.Property<DateTime?>("ModifiedTimeStamp")
  139. .HasColumnType("TEXT");
  140. b.Property<string>("ProductCode")
  141. .IsRequired()
  142. .HasColumnType("TEXT");
  143. b.Property<string>("ProductLabel")
  144. .HasColumnType("TEXT");
  145. b.HasKey("Id");
  146. b.ToTable("ProductConfigs");
  147. });
  148. modelBuilder.Entity("Application.ATG_Classic_App.Model.TankConfig", b =>
  149. {
  150. b.Property<int>("Id")
  151. .ValueGeneratedOnAdd()
  152. .HasColumnType("INTEGER");
  153. b.Property<DateTime>("CreatedTimeStamp")
  154. .HasColumnType("TEXT");
  155. b.Property<int>("DeliveryDelay")
  156. .HasColumnType("INTEGER");
  157. b.Property<double>("Diameter")
  158. .HasColumnType("REAL");
  159. b.Property<string>("Label")
  160. .HasColumnType("TEXT");
  161. b.Property<DateTime?>("ModifiedTimeStamp")
  162. .HasColumnType("TEXT");
  163. b.Property<int?>("ProbeConfigId")
  164. .HasColumnType("INTEGER");
  165. b.Property<int?>("ProductConfigId")
  166. .HasColumnType("INTEGER");
  167. b.Property<int?>("TankLimitConfigId")
  168. .HasColumnType("INTEGER");
  169. b.Property<byte>("TankNumber")
  170. .HasColumnType("INTEGER");
  171. b.Property<double>("ThermalCoefficient")
  172. .HasColumnType("REAL");
  173. b.HasKey("Id");
  174. b.HasIndex("ProbeConfigId");
  175. b.HasIndex("ProductConfigId");
  176. b.HasIndex("TankLimitConfigId");
  177. b.ToTable("TankConfigs");
  178. });
  179. modelBuilder.Entity("Application.ATG_Classic_App.Model.TankLimitConfig", b =>
  180. {
  181. b.Property<int>("Id")
  182. .ValueGeneratedOnAdd()
  183. .HasColumnType("INTEGER");
  184. b.Property<DateTime>("CreatedTimeStamp")
  185. .HasColumnType("TEXT");
  186. b.Property<double>("FuelTemperatureHighLimit")
  187. .HasColumnType("REAL");
  188. b.Property<double>("FuelTemperatureLowLimit")
  189. .HasColumnType("REAL");
  190. b.Property<double>("FullVolume")
  191. .HasColumnType("REAL");
  192. b.Property<double>("HighProduct")
  193. .HasColumnType("REAL");
  194. b.Property<double>("HighWaterAlarm")
  195. .HasColumnType("REAL");
  196. b.Property<double>("HighWaterWarning")
  197. .HasColumnType("REAL");
  198. b.Property<double>("LowProduct")
  199. .HasColumnType("REAL");
  200. b.Property<double>("MaxVolume")
  201. .HasColumnType("REAL");
  202. b.Property<DateTime?>("ModifiedTimeStamp")
  203. .HasColumnType("TEXT");
  204. b.HasKey("Id");
  205. b.ToTable("TankLimitConfigs");
  206. });
  207. modelBuilder.Entity("Application.ATG_Classic_App.Model.TankOverallConfig", b =>
  208. {
  209. b.Property<int>("Id")
  210. .ValueGeneratedOnAdd()
  211. .HasColumnType("INTEGER");
  212. b.Property<DateTime>("CreatedTimeStamp")
  213. .HasColumnType("TEXT");
  214. b.Property<int>("DeliveryMode")
  215. .HasColumnType("INTEGER");
  216. b.Property<int>("InventorySamplingInterval")
  217. .HasColumnType("INTEGER");
  218. b.Property<DateTime?>("ModifiedTimeStamp")
  219. .HasColumnType("TEXT");
  220. b.Property<double>("TcReference")
  221. .HasColumnType("REAL");
  222. b.HasKey("Id");
  223. b.ToTable("TankOverallConfigs");
  224. });
  225. modelBuilder.Entity("Application.ATG_Classic_App.Model.TankProfileData", b =>
  226. {
  227. b.Property<int>("Id")
  228. .ValueGeneratedOnAdd()
  229. .HasColumnType("INTEGER");
  230. b.Property<string>("BatchLabel")
  231. .HasColumnType("TEXT");
  232. b.Property<double>("Height")
  233. .HasColumnType("REAL");
  234. b.Property<int>("TankConfigId")
  235. .HasColumnType("INTEGER");
  236. b.Property<double>("Volume")
  237. .HasColumnType("REAL");
  238. b.Property<double?>("VolumeChange")
  239. .HasColumnType("REAL");
  240. b.HasKey("Id");
  241. b.HasIndex("TankConfigId");
  242. b.HasIndex("BatchLabel", "Height")
  243. .IsUnique();
  244. b.ToTable("TankProfileDatas");
  245. });
  246. modelBuilder.Entity("Application.ATG_Classic_App.Model.TankConfig", b =>
  247. {
  248. b.HasOne("Application.ATG_Classic_App.Model.ProbeConfig", "ProbeConfig")
  249. .WithMany()
  250. .HasForeignKey("ProbeConfigId");
  251. b.HasOne("Application.ATG_Classic_App.Model.ProductConfig", "ProductConfig")
  252. .WithMany()
  253. .HasForeignKey("ProductConfigId");
  254. b.HasOne("Application.ATG_Classic_App.Model.TankLimitConfig", "TankLimitConfig")
  255. .WithMany()
  256. .HasForeignKey("TankLimitConfigId");
  257. });
  258. modelBuilder.Entity("Application.ATG_Classic_App.Model.TankProfileData", b =>
  259. {
  260. b.HasOne("Application.ATG_Classic_App.Model.TankConfig", "TankConfig")
  261. .WithMany("TankProfileDatas")
  262. .HasForeignKey("TankConfigId")
  263. .OnDelete(DeleteBehavior.Cascade)
  264. .IsRequired();
  265. });
  266. #pragma warning restore 612, 618
  267. }
  268. }
  269. }