20210415083245_InitialCreate.Designer.cs 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  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("20210415083245_InitialCreate")]
  12. partial class InitialCreate
  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<decimal>("Amount")
  69. .HasColumnType("TEXT");
  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<decimal>("Price")
  83. .HasColumnType("TEXT");
  84. b.Property<int>("PumpId")
  85. .HasColumnType("INTEGER");
  86. b.Property<decimal>("Qualtity")
  87. .HasColumnType("TEXT");
  88. b.Property<int?>("SiteLevelNozzleId")
  89. .HasColumnType("INTEGER");
  90. b.Property<decimal?>("TotalVolume")
  91. .HasColumnType("TEXT");
  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.Payment", b =>
  103. {
  104. b.Property<int>("Id")
  105. .ValueGeneratedOnAdd()
  106. .HasColumnType("INTEGER");
  107. b.Property<string>("AuthCode")
  108. .HasColumnType("TEXT");
  109. b.Property<string>("BillNumber")
  110. .HasColumnType("TEXT");
  111. b.Property<string>("Comment")
  112. .HasColumnType("TEXT");
  113. b.Property<decimal>("ExpectAmount")
  114. .HasColumnType("TEXT");
  115. b.Property<int>("Method")
  116. .HasColumnType("INTEGER");
  117. b.Property<decimal>("PaidAmount")
  118. .HasColumnType("TEXT");
  119. b.Property<int>("TradeStatus")
  120. .HasColumnType("INTEGER");
  121. b.Property<int?>("TransactionId")
  122. .HasColumnType("INTEGER");
  123. b.HasKey("Id");
  124. b.HasIndex("TransactionId");
  125. b.ToTable("Payment");
  126. });
  127. modelBuilder.Entity("Gateway.POS.Models.Transaction", b =>
  128. {
  129. b.Property<int>("Id")
  130. .ValueGeneratedOnAdd()
  131. .HasColumnType("INTEGER");
  132. b.Property<DateTime?>("ClientSideTimestamp")
  133. .HasColumnType("TEXT");
  134. b.Property<string>("Comment")
  135. .HasColumnType("TEXT");
  136. b.Property<decimal?>("NetAmount")
  137. .HasColumnType("TEXT");
  138. b.Property<string>("OperatorId")
  139. .HasColumnType("TEXT");
  140. b.Property<string>("ReceiptId")
  141. .HasColumnType("TEXT");
  142. b.Property<DateTime>("ServerSideTimestamp")
  143. .HasColumnType("TEXT");
  144. b.Property<string>("ShiftId")
  145. .HasColumnType("TEXT");
  146. b.Property<string>("SiteId")
  147. .HasColumnType("TEXT");
  148. b.Property<string>("TerminalId")
  149. .HasColumnType("TEXT");
  150. b.Property<decimal?>("TotalAmount")
  151. .HasColumnType("TEXT");
  152. b.Property<int>("TransactionType")
  153. .HasColumnType("INTEGER");
  154. b.HasKey("Id");
  155. b.HasIndex("Id")
  156. .IsUnique();
  157. b.HasIndex("NetAmount");
  158. b.HasIndex("ReceiptId")
  159. .IsUnique();
  160. b.HasIndex("ServerSideTimestamp");
  161. b.HasIndex("ShiftId");
  162. b.HasIndex("TotalAmount");
  163. b.ToTable("Transactions");
  164. });
  165. modelBuilder.Entity("Gateway.POS.Models.AppliedDiscount", b =>
  166. {
  167. b.HasOne("Gateway.POS.Models.Discount", "Discount")
  168. .WithMany()
  169. .HasForeignKey("DiscountId")
  170. .OnDelete(DeleteBehavior.Cascade)
  171. .IsRequired();
  172. b.HasOne("Gateway.POS.Models.Transaction", null)
  173. .WithMany("AppliedDiscounts")
  174. .HasForeignKey("TransactionId");
  175. b.Navigation("Discount");
  176. });
  177. modelBuilder.Entity("Gateway.POS.Models.FuelItem", b =>
  178. {
  179. b.HasOne("Gateway.POS.Models.Transaction", null)
  180. .WithMany("FuelItems")
  181. .HasForeignKey("TransactionId");
  182. });
  183. modelBuilder.Entity("Gateway.POS.Models.Payment", b =>
  184. {
  185. b.HasOne("Gateway.POS.Models.Transaction", null)
  186. .WithMany("Payments")
  187. .HasForeignKey("TransactionId");
  188. });
  189. modelBuilder.Entity("Gateway.POS.Models.Transaction", b =>
  190. {
  191. b.Navigation("AppliedDiscounts");
  192. b.Navigation("FuelItems");
  193. b.Navigation("Payments");
  194. });
  195. #pragma warning restore 612, 618
  196. }
  197. }
  198. }