20210526091426_addSourceTrxIdToRedeemAndRecharge.Designer.cs 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876
  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("20210526091426_addSourceTrxIdToRedeemAndRecharge")]
  12. partial class addSourceTrxIdToRedeemAndRecharge
  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.MembershipAccount", b =>
  103. {
  104. b.Property<int>("Id")
  105. .ValueGeneratedOnAdd()
  106. .HasColumnType("INTEGER");
  107. b.Property<string>("Address")
  108. .HasColumnType("TEXT");
  109. b.Property<int>("Age")
  110. .HasColumnType("INTEGER");
  111. b.Property<bool>("AllowSubAccountAccessProfitAccounts")
  112. .HasColumnType("INTEGER");
  113. b.Property<DateTime?>("Birth")
  114. .HasColumnType("TEXT");
  115. b.Property<DateTime?>("ClientSideTimestamp")
  116. .HasColumnType("TEXT");
  117. b.Property<string>("CompanyName")
  118. .HasColumnType("TEXT");
  119. b.Property<string>("ConsumeRestrictionComplexData")
  120. .HasColumnType("TEXT");
  121. b.Property<int?>("CreateByOperatorId")
  122. .HasColumnType("INTEGER");
  123. b.Property<string>("Description")
  124. .HasColumnType("TEXT");
  125. b.Property<string>("Email")
  126. .HasColumnType("TEXT");
  127. b.Property<bool>("EnableProfitAccountBalanceChangeNotify")
  128. .HasColumnType("INTEGER");
  129. b.Property<string>("InvoiceCompanyName")
  130. .HasColumnType("TEXT");
  131. b.Property<string>("InvoiceTaxNumber")
  132. .HasColumnType("TEXT");
  133. b.Property<bool>("IsMale")
  134. .HasColumnType("INTEGER");
  135. b.Property<int?>("MembershipLevel")
  136. .HasColumnType("INTEGER");
  137. b.Property<string>("Name")
  138. .IsRequired()
  139. .HasColumnType("TEXT");
  140. b.Property<string>("PhoneNumber")
  141. .HasColumnType("TEXT");
  142. b.Property<DateTime>("ServerSideCreatedTimestamp")
  143. .HasColumnType("TEXT");
  144. b.Property<DateTime?>("ServerSideLastModifiedTimestamp")
  145. .HasColumnType("TEXT");
  146. b.Property<DateTime?>("SuspendStateEndTime")
  147. .HasColumnType("TEXT");
  148. b.Property<DateTime?>("SuspendStateStartTime")
  149. .HasColumnType("TEXT");
  150. b.HasKey("Id");
  151. b.HasIndex("CreateByOperatorId");
  152. b.HasIndex("Name", "CompanyName", "PhoneNumber");
  153. b.ToTable("MembershipAccounts");
  154. });
  155. modelBuilder.Entity("Gateway.POS.Models.MembershipAccount_M2M_MembershipTag", b =>
  156. {
  157. b.Property<int>("MembershipTagId")
  158. .HasColumnType("INTEGER");
  159. b.Property<int>("MembershipAccountId")
  160. .HasColumnType("INTEGER");
  161. b.HasKey("MembershipTagId", "MembershipAccountId");
  162. b.HasIndex("MembershipAccountId");
  163. b.ToTable("MembershipAccount_M2M_MembershipTags");
  164. });
  165. modelBuilder.Entity("Gateway.POS.Models.MembershipProfitAccount", b =>
  166. {
  167. b.Property<int>("Id")
  168. .ValueGeneratedOnAdd()
  169. .HasColumnType("INTEGER");
  170. b.Property<double?>("Balance")
  171. .HasColumnType("REAL");
  172. b.Property<string>("BalanceComplexData")
  173. .HasColumnType("TEXT");
  174. b.Property<int?>("MembershipAccountId")
  175. .HasColumnType("INTEGER");
  176. b.Property<int?>("MembershipSubAccountId")
  177. .HasColumnType("INTEGER");
  178. b.Property<int>("ProfitType")
  179. .HasColumnType("INTEGER");
  180. b.Property<int>("RedeemAuthMode")
  181. .HasColumnType("INTEGER");
  182. b.Property<string>("RedeemAuthPassword")
  183. .HasColumnType("TEXT");
  184. b.Property<DateTime>("ServerSideCreatedTimestamp")
  185. .HasColumnType("TEXT");
  186. b.Property<DateTime?>("ServerSideLastModifiedTimestamp")
  187. .HasColumnType("TEXT");
  188. b.HasKey("Id");
  189. b.HasIndex("MembershipAccountId");
  190. b.HasIndex("MembershipSubAccountId");
  191. b.ToTable("MembershipProfitAccounts");
  192. });
  193. modelBuilder.Entity("Gateway.POS.Models.MembershipProfitAccountRecharge", b =>
  194. {
  195. b.Property<int>("Id")
  196. .ValueGeneratedOnAdd()
  197. .HasColumnType("INTEGER");
  198. b.Property<int?>("CreateByOperatorId")
  199. .HasColumnType("INTEGER");
  200. b.Property<string>("Description")
  201. .HasColumnType("TEXT");
  202. b.Property<DateTime?>("InvoiceIssuedDateTime")
  203. .HasColumnType("TEXT");
  204. b.Property<int>("MembershipProfitAccountId")
  205. .HasColumnType("INTEGER");
  206. b.Property<decimal?>("ProfitAccountAmountBalance")
  207. .HasColumnType("TEXT");
  208. b.Property<double?>("RechargeAmount")
  209. .HasColumnType("REAL");
  210. b.Property<int>("RechargeSource")
  211. .HasColumnType("INTEGER");
  212. b.Property<int?>("SourceTrxId")
  213. .HasColumnType("INTEGER");
  214. b.Property<DateTime>("Timestamp")
  215. .HasColumnType("TEXT");
  216. b.HasKey("Id");
  217. b.HasIndex("CreateByOperatorId");
  218. b.HasIndex("MembershipProfitAccountId");
  219. b.HasIndex("SourceTrxId")
  220. .IsUnique();
  221. b.ToTable("MembershipProfitAccountRecharges");
  222. });
  223. modelBuilder.Entity("Gateway.POS.Models.MembershipProfitAccountRedeem", b =>
  224. {
  225. b.Property<int>("Id")
  226. .ValueGeneratedOnAdd()
  227. .HasColumnType("INTEGER");
  228. b.Property<int?>("CreateByOperatorId")
  229. .HasColumnType("INTEGER");
  230. b.Property<string>("Description")
  231. .HasColumnType("TEXT");
  232. b.Property<int>("MembershipProfitAccountId")
  233. .HasColumnType("INTEGER");
  234. b.Property<decimal?>("ProfitAccountAmountBalance")
  235. .HasColumnType("TEXT");
  236. b.Property<string>("Purpose")
  237. .HasColumnType("TEXT");
  238. b.Property<double?>("RedeemedProfitAmount")
  239. .HasColumnType("REAL");
  240. b.Property<string>("RedeemedProfitComplexData")
  241. .HasColumnType("TEXT");
  242. b.Property<int?>("SourceTrxId")
  243. .HasColumnType("INTEGER");
  244. b.Property<DateTime>("Timestamp")
  245. .HasColumnType("TEXT");
  246. b.HasKey("Id");
  247. b.HasIndex("CreateByOperatorId");
  248. b.HasIndex("MembershipProfitAccountId");
  249. b.HasIndex("SourceTrxId")
  250. .IsUnique();
  251. b.ToTable("MembershipProfitAccountRedeems");
  252. });
  253. modelBuilder.Entity("Gateway.POS.Models.MembershipSubAccount", b =>
  254. {
  255. b.Property<int>("Id")
  256. .ValueGeneratedOnAdd()
  257. .HasColumnType("INTEGER");
  258. b.Property<int>("AccountState")
  259. .HasColumnType("INTEGER");
  260. b.Property<string>("ConsumeRestrictionComplexData")
  261. .HasColumnType("TEXT");
  262. b.Property<int?>("CreateByOperatorId")
  263. .HasColumnType("INTEGER");
  264. b.Property<string>("Description")
  265. .HasColumnType("TEXT");
  266. b.Property<bool>("EnableProfitAccountBalanceChangeNotify")
  267. .HasColumnType("INTEGER");
  268. b.Property<string>("LastAccountStateUpdateReason")
  269. .HasColumnType("TEXT");
  270. b.Property<DateTime?>("LastAccountStateUpdateTime")
  271. .HasColumnType("TEXT");
  272. b.Property<int>("MembershipAccountId")
  273. .HasColumnType("INTEGER");
  274. b.Property<int?>("MembershipLevel")
  275. .HasColumnType("INTEGER");
  276. b.Property<DateTime>("ServerSideCreatedTimestamp")
  277. .HasColumnType("TEXT");
  278. b.Property<DateTime?>("ServerSideLastModifiedTimestamp")
  279. .HasColumnType("TEXT");
  280. b.Property<string>("SubAccountHolderAddress")
  281. .HasColumnType("TEXT");
  282. b.Property<string>("SubAccountHolderEmail")
  283. .HasColumnType("TEXT");
  284. b.Property<string>("SubAccountHolderName")
  285. .HasColumnType("TEXT");
  286. b.Property<string>("SubAccountHolderPhoneNumber")
  287. .HasColumnType("TEXT");
  288. b.Property<DateTime?>("SuspendStateEndTime")
  289. .HasColumnType("TEXT");
  290. b.Property<DateTime?>("SuspendStateStartTime")
  291. .HasColumnType("TEXT");
  292. b.HasKey("Id");
  293. b.HasIndex("CreateByOperatorId");
  294. b.HasIndex("MembershipAccountId");
  295. b.ToTable("MembershipSubAccounts");
  296. });
  297. modelBuilder.Entity("Gateway.POS.Models.MembershipSubAccountIdentity", b =>
  298. {
  299. b.Property<int>("Id")
  300. .ValueGeneratedOnAdd()
  301. .HasColumnType("INTEGER");
  302. b.Property<string>("Description")
  303. .HasColumnType("TEXT");
  304. b.Property<string>("Identity")
  305. .HasColumnType("TEXT");
  306. b.Property<int>("IdentityCarrierType")
  307. .HasColumnType("INTEGER");
  308. b.Property<int>("MembershipSubAccountId")
  309. .HasColumnType("INTEGER");
  310. b.HasKey("Id");
  311. b.HasIndex("MembershipSubAccountId", "Identity", "IdentityCarrierType")
  312. .IsUnique();
  313. b.ToTable("MembershipSubAccountIdentities");
  314. });
  315. modelBuilder.Entity("Gateway.POS.Models.MembershipSubAccount_M2M_MembershipTag", b =>
  316. {
  317. b.Property<int>("MembershipTagId")
  318. .HasColumnType("INTEGER");
  319. b.Property<int>("MembershipSubAccountId")
  320. .HasColumnType("INTEGER");
  321. b.HasKey("MembershipTagId", "MembershipSubAccountId");
  322. b.HasIndex("MembershipSubAccountId");
  323. b.ToTable("MembershipSubAccount_M2M_MembershipTags");
  324. });
  325. modelBuilder.Entity("Gateway.POS.Models.MembershipTag", b =>
  326. {
  327. b.Property<int>("Id")
  328. .ValueGeneratedOnAdd()
  329. .HasColumnType("INTEGER");
  330. b.Property<string>("Description")
  331. .HasColumnType("TEXT");
  332. b.Property<string>("Name")
  333. .HasColumnType("TEXT");
  334. b.HasKey("Id");
  335. b.HasIndex("Name")
  336. .IsUnique();
  337. b.ToTable("MembershipTags");
  338. });
  339. modelBuilder.Entity("Gateway.POS.Models.Operator", b =>
  340. {
  341. b.Property<int>("Id")
  342. .ValueGeneratedOnAdd()
  343. .HasColumnType("INTEGER");
  344. b.Property<DateTime>("CreatedTimestamp")
  345. .HasColumnType("TEXT");
  346. b.Property<string>("Description")
  347. .HasColumnType("TEXT");
  348. b.Property<string>("Name")
  349. .HasColumnType("TEXT");
  350. b.Property<string>("Password")
  351. .HasColumnType("TEXT");
  352. b.HasKey("Id");
  353. b.HasIndex("Name")
  354. .IsUnique();
  355. b.ToTable("Operators");
  356. });
  357. modelBuilder.Entity("Gateway.POS.Models.Payment", b =>
  358. {
  359. b.Property<int>("Id")
  360. .ValueGeneratedOnAdd()
  361. .HasColumnType("INTEGER");
  362. b.Property<string>("AuthCode")
  363. .HasColumnType("TEXT");
  364. b.Property<string>("BillNumber")
  365. .HasColumnType("TEXT");
  366. b.Property<string>("CardReaderName")
  367. .HasColumnType("TEXT");
  368. b.Property<string>("Comment")
  369. .HasColumnType("TEXT");
  370. b.Property<double>("ExpectAmount")
  371. .HasColumnType("REAL");
  372. b.Property<int>("Method")
  373. .HasColumnType("INTEGER");
  374. b.Property<double>("PaidAmount")
  375. .HasColumnType("REAL");
  376. b.Property<int?>("TargetMembershipAccountId")
  377. .HasColumnType("INTEGER");
  378. b.Property<int?>("TargetMembershipSubAccountId")
  379. .HasColumnType("INTEGER");
  380. b.Property<int>("TradeStatus")
  381. .HasColumnType("INTEGER");
  382. b.Property<int>("TransactionId")
  383. .HasColumnType("INTEGER");
  384. b.HasKey("Id");
  385. b.HasIndex("TransactionId");
  386. b.ToTable("Payments");
  387. });
  388. modelBuilder.Entity("Gateway.POS.Models.Transaction", b =>
  389. {
  390. b.Property<int>("Id")
  391. .ValueGeneratedOnAdd()
  392. .HasColumnType("INTEGER");
  393. b.Property<DateTime?>("ClientSideTimestamp")
  394. .HasColumnType("TEXT");
  395. b.Property<string>("Comment")
  396. .HasColumnType("TEXT");
  397. b.Property<int?>("MembershipProfitAccountRechargeId")
  398. .HasColumnType("INTEGER");
  399. b.Property<int?>("MembershipProfitAccountRedeemId")
  400. .HasColumnType("INTEGER");
  401. b.Property<double?>("NetAmount")
  402. .HasColumnType("REAL");
  403. b.Property<int>("OperatorId")
  404. .HasColumnType("INTEGER");
  405. b.Property<string>("ReceiptId")
  406. .HasColumnType("TEXT");
  407. b.Property<DateTime>("ServerSideTimestamp")
  408. .HasColumnType("TEXT");
  409. b.Property<string>("ShiftId")
  410. .HasColumnType("TEXT");
  411. b.Property<string>("SiteId")
  412. .HasColumnType("TEXT");
  413. b.Property<string>("TerminalId")
  414. .HasColumnType("TEXT");
  415. b.Property<double?>("TotalAmount")
  416. .HasColumnType("REAL");
  417. b.Property<int?>("TransactionSubType")
  418. .HasColumnType("INTEGER");
  419. b.Property<int>("TransactionType")
  420. .HasColumnType("INTEGER");
  421. b.HasKey("Id");
  422. b.HasIndex("Id")
  423. .IsUnique();
  424. b.HasIndex("NetAmount");
  425. b.HasIndex("OperatorId");
  426. b.HasIndex("ReceiptId")
  427. .IsUnique();
  428. b.HasIndex("ServerSideTimestamp");
  429. b.HasIndex("ShiftId");
  430. b.HasIndex("TotalAmount");
  431. b.ToTable("Transactions");
  432. });
  433. modelBuilder.Entity("Gateway.POS.Models.AppliedDiscount", b =>
  434. {
  435. b.HasOne("Gateway.POS.Models.Discount", "Discount")
  436. .WithMany()
  437. .HasForeignKey("DiscountId")
  438. .OnDelete(DeleteBehavior.Cascade)
  439. .IsRequired();
  440. b.HasOne("Gateway.POS.Models.Transaction", null)
  441. .WithMany("AppliedDiscounts")
  442. .HasForeignKey("TransactionId");
  443. b.Navigation("Discount");
  444. });
  445. modelBuilder.Entity("Gateway.POS.Models.FuelItem", b =>
  446. {
  447. b.HasOne("Gateway.POS.Models.Transaction", "Transaction")
  448. .WithMany("FuelItems")
  449. .HasForeignKey("TransactionId")
  450. .OnDelete(DeleteBehavior.Cascade)
  451. .IsRequired();
  452. b.Navigation("Transaction");
  453. });
  454. modelBuilder.Entity("Gateway.POS.Models.MembershipAccount", b =>
  455. {
  456. b.HasOne("Gateway.POS.Models.Operator", "CreateByOperator")
  457. .WithMany()
  458. .HasForeignKey("CreateByOperatorId");
  459. b.Navigation("CreateByOperator");
  460. });
  461. modelBuilder.Entity("Gateway.POS.Models.MembershipAccount_M2M_MembershipTag", b =>
  462. {
  463. b.HasOne("Gateway.POS.Models.MembershipAccount", "Account")
  464. .WithMany("AccountTags")
  465. .HasForeignKey("MembershipAccountId")
  466. .OnDelete(DeleteBehavior.Cascade)
  467. .IsRequired();
  468. b.HasOne("Gateway.POS.Models.MembershipTag", "Tag")
  469. .WithMany("AccountTags")
  470. .HasForeignKey("MembershipTagId")
  471. .OnDelete(DeleteBehavior.Cascade)
  472. .IsRequired();
  473. b.Navigation("Account");
  474. b.Navigation("Tag");
  475. });
  476. modelBuilder.Entity("Gateway.POS.Models.MembershipProfitAccount", b =>
  477. {
  478. b.HasOne("Gateway.POS.Models.MembershipAccount", "Account")
  479. .WithMany("ProfitAccounts")
  480. .HasForeignKey("MembershipAccountId");
  481. b.HasOne("Gateway.POS.Models.MembershipSubAccount", "SubAccount")
  482. .WithMany("ProfitAccounts")
  483. .HasForeignKey("MembershipSubAccountId");
  484. b.Navigation("Account");
  485. b.Navigation("SubAccount");
  486. });
  487. modelBuilder.Entity("Gateway.POS.Models.MembershipProfitAccountRecharge", b =>
  488. {
  489. b.HasOne("Gateway.POS.Models.Operator", "CreateByOperator")
  490. .WithMany()
  491. .HasForeignKey("CreateByOperatorId");
  492. b.HasOne("Gateway.POS.Models.MembershipProfitAccount", "ProfitAccount")
  493. .WithMany("ProfitRecharges")
  494. .HasForeignKey("MembershipProfitAccountId")
  495. .OnDelete(DeleteBehavior.Cascade)
  496. .IsRequired();
  497. b.HasOne("Gateway.POS.Models.Transaction", "SourceTrx")
  498. .WithOne("MembershipProfitAccountRecharge")
  499. .HasForeignKey("Gateway.POS.Models.MembershipProfitAccountRecharge", "SourceTrxId");
  500. b.Navigation("CreateByOperator");
  501. b.Navigation("ProfitAccount");
  502. b.Navigation("SourceTrx");
  503. });
  504. modelBuilder.Entity("Gateway.POS.Models.MembershipProfitAccountRedeem", b =>
  505. {
  506. b.HasOne("Gateway.POS.Models.Operator", "CreateByOperator")
  507. .WithMany()
  508. .HasForeignKey("CreateByOperatorId");
  509. b.HasOne("Gateway.POS.Models.MembershipProfitAccount", "ProfitAccount")
  510. .WithMany("ProfitRedeems")
  511. .HasForeignKey("MembershipProfitAccountId")
  512. .OnDelete(DeleteBehavior.Cascade)
  513. .IsRequired();
  514. b.HasOne("Gateway.POS.Models.Transaction", "SourceTrx")
  515. .WithOne("MembershipProfitAccountRedeem")
  516. .HasForeignKey("Gateway.POS.Models.MembershipProfitAccountRedeem", "SourceTrxId");
  517. b.Navigation("CreateByOperator");
  518. b.Navigation("ProfitAccount");
  519. b.Navigation("SourceTrx");
  520. });
  521. modelBuilder.Entity("Gateway.POS.Models.MembershipSubAccount", b =>
  522. {
  523. b.HasOne("Gateway.POS.Models.Operator", "CreateByOperator")
  524. .WithMany("OperatorCards")
  525. .HasForeignKey("CreateByOperatorId");
  526. b.HasOne("Gateway.POS.Models.MembershipAccount", "Account")
  527. .WithMany("SubAccounts")
  528. .HasForeignKey("MembershipAccountId")
  529. .OnDelete(DeleteBehavior.Cascade)
  530. .IsRequired();
  531. b.Navigation("Account");
  532. b.Navigation("CreateByOperator");
  533. });
  534. modelBuilder.Entity("Gateway.POS.Models.MembershipSubAccountIdentity", b =>
  535. {
  536. b.HasOne("Gateway.POS.Models.MembershipSubAccount", "SubAccount")
  537. .WithMany("Identities")
  538. .HasForeignKey("MembershipSubAccountId")
  539. .OnDelete(DeleteBehavior.Cascade)
  540. .IsRequired();
  541. b.Navigation("SubAccount");
  542. });
  543. modelBuilder.Entity("Gateway.POS.Models.MembershipSubAccount_M2M_MembershipTag", b =>
  544. {
  545. b.HasOne("Gateway.POS.Models.MembershipSubAccount", "SubAccount")
  546. .WithMany("SubAccountTags")
  547. .HasForeignKey("MembershipSubAccountId")
  548. .OnDelete(DeleteBehavior.Cascade)
  549. .IsRequired();
  550. b.HasOne("Gateway.POS.Models.MembershipTag", "Tag")
  551. .WithMany("SubAccountTags")
  552. .HasForeignKey("MembershipTagId")
  553. .OnDelete(DeleteBehavior.Cascade)
  554. .IsRequired();
  555. b.Navigation("SubAccount");
  556. b.Navigation("Tag");
  557. });
  558. modelBuilder.Entity("Gateway.POS.Models.Payment", b =>
  559. {
  560. b.HasOne("Gateway.POS.Models.Transaction", "Transaction")
  561. .WithMany("Payments")
  562. .HasForeignKey("TransactionId")
  563. .OnDelete(DeleteBehavior.Cascade)
  564. .IsRequired();
  565. b.Navigation("Transaction");
  566. });
  567. modelBuilder.Entity("Gateway.POS.Models.Transaction", b =>
  568. {
  569. b.HasOne("Gateway.POS.Models.Operator", "Operator")
  570. .WithMany()
  571. .HasForeignKey("OperatorId")
  572. .OnDelete(DeleteBehavior.Cascade)
  573. .IsRequired();
  574. b.Navigation("Operator");
  575. });
  576. modelBuilder.Entity("Gateway.POS.Models.MembershipAccount", b =>
  577. {
  578. b.Navigation("AccountTags");
  579. b.Navigation("ProfitAccounts");
  580. b.Navigation("SubAccounts");
  581. });
  582. modelBuilder.Entity("Gateway.POS.Models.MembershipProfitAccount", b =>
  583. {
  584. b.Navigation("ProfitRecharges");
  585. b.Navigation("ProfitRedeems");
  586. });
  587. modelBuilder.Entity("Gateway.POS.Models.MembershipSubAccount", b =>
  588. {
  589. b.Navigation("Identities");
  590. b.Navigation("ProfitAccounts");
  591. b.Navigation("SubAccountTags");
  592. });
  593. modelBuilder.Entity("Gateway.POS.Models.MembershipTag", b =>
  594. {
  595. b.Navigation("AccountTags");
  596. b.Navigation("SubAccountTags");
  597. });
  598. modelBuilder.Entity("Gateway.POS.Models.Operator", b =>
  599. {
  600. b.Navigation("OperatorCards");
  601. });
  602. modelBuilder.Entity("Gateway.POS.Models.Transaction", b =>
  603. {
  604. b.Navigation("AppliedDiscounts");
  605. b.Navigation("FuelItems");
  606. b.Navigation("MembershipProfitAccountRecharge");
  607. b.Navigation("MembershipProfitAccountRedeem");
  608. b.Navigation("Payments");
  609. });
  610. #pragma warning restore 612, 618
  611. }
  612. }
  613. }