20210418014800_FuelItemUseDouble.Designer.cs 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328
  1. // <auto-generated />
  2. using System;
  3. using Gateway.POS;
  4. using Microsoft.EntityFrameworkCore;
  5. using Microsoft.EntityFrameworkCore.Infrastructure;
  6. using Microsoft.EntityFrameworkCore.Migrations;
  7. using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
  8. namespace Gateway.POS.Migrations
  9. {
  10. [DbContext(typeof(PosAppDbContext))]
  11. [Migration("20210418014800_FuelItemUseDouble")]
  12. partial class FuelItemUseDouble
  13. {
  14. protected override void BuildTargetModel(ModelBuilder modelBuilder)
  15. {
  16. #pragma warning disable 612, 618
  17. modelBuilder
  18. .HasAnnotation("ProductVersion", "5.0.5");
  19. modelBuilder.Entity("Gateway.POS.Models.AppliedDiscount", b =>
  20. {
  21. b.Property<int>("Id")
  22. .ValueGeneratedOnAdd()
  23. .HasColumnType("INTEGER");
  24. b.Property<int>("DiscountId")
  25. .HasColumnType("INTEGER");
  26. b.Property<decimal>("DiscountedAmount")
  27. .HasColumnType("TEXT");
  28. b.Property<int?>("TransactionId")
  29. .HasColumnType("INTEGER");
  30. b.HasKey("Id");
  31. b.HasIndex("DiscountId");
  32. b.HasIndex("TransactionId");
  33. b.ToTable("AppliedDiscount");
  34. });
  35. modelBuilder.Entity("Gateway.POS.Models.Discount", b =>
  36. {
  37. b.Property<int>("Id")
  38. .ValueGeneratedOnAdd()
  39. .HasColumnType("INTEGER");
  40. b.Property<string>("Command")
  41. .HasColumnType("TEXT");
  42. b.Property<DateTime>("CreatedTime")
  43. .HasColumnType("TEXT");
  44. b.Property<string>("Description")
  45. .HasColumnType("TEXT");
  46. b.Property<int>("DiscountType")
  47. .HasColumnType("INTEGER");
  48. b.Property<DateTime?>("EndTime")
  49. .HasColumnType("TEXT");
  50. b.Property<bool>("IsMarkedAsDeletion")
  51. .HasColumnType("INTEGER");
  52. b.Property<DateTime?>("ModifiedTime")
  53. .HasColumnType("TEXT");
  54. b.Property<string>("Name")
  55. .HasColumnType("TEXT");
  56. b.Property<DateTime?>("StartTime")
  57. .HasColumnType("TEXT");
  58. b.Property<string>("TargetFuelProductCode")
  59. .HasColumnType("TEXT");
  60. b.HasKey("Id");
  61. b.ToTable("Discounts");
  62. });
  63. modelBuilder.Entity("Gateway.POS.Models.FuelItem", b =>
  64. {
  65. b.Property<int>("Id")
  66. .ValueGeneratedOnAdd()
  67. .HasColumnType("INTEGER");
  68. b.Property<double>("Amount")
  69. .HasColumnType("REAL");
  70. b.Property<string>("FuelProductCode")
  71. .HasColumnType("TEXT");
  72. b.Property<string>("FuelProductName")
  73. .HasColumnType("TEXT");
  74. b.Property<string>("FuelTrxSequenceNumber")
  75. .HasColumnType("TEXT");
  76. b.Property<DateTime?>("FuelingEndTime")
  77. .HasColumnType("TEXT");
  78. b.Property<DateTime?>("FuelingStartTime")
  79. .HasColumnType("TEXT");
  80. b.Property<int>("NozzleLogicalId")
  81. .HasColumnType("INTEGER");
  82. b.Property<double>("Price")
  83. .HasColumnType("REAL");
  84. b.Property<int>("PumpId")
  85. .HasColumnType("INTEGER");
  86. b.Property<double>("Qualtity")
  87. .HasColumnType("REAL");
  88. b.Property<int?>("SiteLevelNozzleId")
  89. .HasColumnType("INTEGER");
  90. b.Property<double?>("TotalVolume")
  91. .HasColumnType("REAL");
  92. b.Property<int>("TransactionId")
  93. .HasColumnType("INTEGER");
  94. b.HasKey("Id");
  95. b.HasIndex("Amount");
  96. b.HasIndex("FuelProductCode");
  97. b.HasIndex("SiteLevelNozzleId");
  98. b.HasIndex("TransactionId");
  99. b.HasIndex("PumpId", "NozzleLogicalId");
  100. b.ToTable("FuelItems");
  101. });
  102. modelBuilder.Entity("Gateway.POS.Models.Operator", b =>
  103. {
  104. b.Property<int>("Id")
  105. .ValueGeneratedOnAdd()
  106. .HasColumnType("INTEGER");
  107. b.Property<DateTime>("CreatedTimestamp")
  108. .HasColumnType("TEXT");
  109. b.Property<string>("Description")
  110. .HasColumnType("TEXT");
  111. b.Property<string>("Name")
  112. .HasColumnType("TEXT");
  113. b.Property<string>("Password")
  114. .HasColumnType("TEXT");
  115. b.HasKey("Id");
  116. b.HasIndex("Name")
  117. .IsUnique();
  118. b.ToTable("Operators");
  119. });
  120. modelBuilder.Entity("Gateway.POS.Models.Payment", b =>
  121. {
  122. b.Property<int>("Id")
  123. .ValueGeneratedOnAdd()
  124. .HasColumnType("INTEGER");
  125. b.Property<string>("AuthCode")
  126. .HasColumnType("TEXT");
  127. b.Property<string>("BillNumber")
  128. .HasColumnType("TEXT");
  129. b.Property<string>("Comment")
  130. .HasColumnType("TEXT");
  131. b.Property<decimal>("ExpectAmount")
  132. .HasColumnType("TEXT");
  133. b.Property<int>("Method")
  134. .HasColumnType("INTEGER");
  135. b.Property<decimal>("PaidAmount")
  136. .HasColumnType("TEXT");
  137. b.Property<int>("TradeStatus")
  138. .HasColumnType("INTEGER");
  139. b.Property<int>("TransactionId")
  140. .HasColumnType("INTEGER");
  141. b.HasKey("Id");
  142. b.HasIndex("TransactionId");
  143. b.ToTable("Payment");
  144. });
  145. modelBuilder.Entity("Gateway.POS.Models.Transaction", b =>
  146. {
  147. b.Property<int>("Id")
  148. .ValueGeneratedOnAdd()
  149. .HasColumnType("INTEGER");
  150. b.Property<DateTime?>("ClientSideTimestamp")
  151. .HasColumnType("TEXT");
  152. b.Property<string>("Comment")
  153. .HasColumnType("TEXT");
  154. b.Property<decimal?>("NetAmount")
  155. .HasColumnType("TEXT");
  156. b.Property<int>("OperatorId")
  157. .HasColumnType("INTEGER");
  158. b.Property<string>("ReceiptId")
  159. .HasColumnType("TEXT");
  160. b.Property<DateTime>("ServerSideTimestamp")
  161. .HasColumnType("TEXT");
  162. b.Property<string>("ShiftId")
  163. .HasColumnType("TEXT");
  164. b.Property<string>("SiteId")
  165. .HasColumnType("TEXT");
  166. b.Property<string>("TerminalId")
  167. .HasColumnType("TEXT");
  168. b.Property<decimal?>("TotalAmount")
  169. .HasColumnType("TEXT");
  170. b.Property<int>("TransactionType")
  171. .HasColumnType("INTEGER");
  172. b.HasKey("Id");
  173. b.HasIndex("Id")
  174. .IsUnique();
  175. b.HasIndex("NetAmount");
  176. b.HasIndex("OperatorId");
  177. b.HasIndex("ReceiptId")
  178. .IsUnique();
  179. b.HasIndex("ServerSideTimestamp");
  180. b.HasIndex("ShiftId");
  181. b.HasIndex("TotalAmount");
  182. b.ToTable("Transactions");
  183. });
  184. modelBuilder.Entity("Gateway.POS.Models.AppliedDiscount", b =>
  185. {
  186. b.HasOne("Gateway.POS.Models.Discount", "Discount")
  187. .WithMany()
  188. .HasForeignKey("DiscountId")
  189. .OnDelete(DeleteBehavior.Cascade)
  190. .IsRequired();
  191. b.HasOne("Gateway.POS.Models.Transaction", null)
  192. .WithMany("AppliedDiscounts")
  193. .HasForeignKey("TransactionId");
  194. b.Navigation("Discount");
  195. });
  196. modelBuilder.Entity("Gateway.POS.Models.FuelItem", b =>
  197. {
  198. b.HasOne("Gateway.POS.Models.Transaction", "Transaction")
  199. .WithMany("FuelItems")
  200. .HasForeignKey("TransactionId")
  201. .OnDelete(DeleteBehavior.Cascade)
  202. .IsRequired();
  203. b.Navigation("Transaction");
  204. });
  205. modelBuilder.Entity("Gateway.POS.Models.Payment", b =>
  206. {
  207. b.HasOne("Gateway.POS.Models.Transaction", "Transaction")
  208. .WithMany("Payments")
  209. .HasForeignKey("TransactionId")
  210. .OnDelete(DeleteBehavior.Cascade)
  211. .IsRequired();
  212. b.Navigation("Transaction");
  213. });
  214. modelBuilder.Entity("Gateway.POS.Models.Transaction", b =>
  215. {
  216. b.HasOne("Gateway.POS.Models.Operator", "Operator")
  217. .WithMany()
  218. .HasForeignKey("OperatorId")
  219. .OnDelete(DeleteBehavior.Cascade)
  220. .IsRequired();
  221. b.Navigation("Operator");
  222. });
  223. modelBuilder.Entity("Gateway.POS.Models.Transaction", b =>
  224. {
  225. b.Navigation("AppliedDiscounts");
  226. b.Navigation("FuelItems");
  227. b.Navigation("Payments");
  228. });
  229. #pragma warning restore 612, 618
  230. }
  231. }
  232. }