20210706014915_set MembershipSubAccountIdentity.Identity to required.Designer.cs 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877
  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("20210706014915_set MembershipSubAccountIdentity.Identity to required")]
  12. partial class setMembershipSubAccountIdentityIdentitytorequired
  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. .IsRequired()
  306. .HasColumnType("TEXT");
  307. b.Property<int>("IdentityCarrierType")
  308. .HasColumnType("INTEGER");
  309. b.Property<int>("MembershipSubAccountId")
  310. .HasColumnType("INTEGER");
  311. b.HasKey("Id");
  312. b.HasIndex("MembershipSubAccountId", "Identity", "IdentityCarrierType")
  313. .IsUnique();
  314. b.ToTable("MembershipSubAccountIdentities");
  315. });
  316. modelBuilder.Entity("Gateway.POS.Models.MembershipSubAccount_M2M_MembershipTag", b =>
  317. {
  318. b.Property<int>("MembershipTagId")
  319. .HasColumnType("INTEGER");
  320. b.Property<int>("MembershipSubAccountId")
  321. .HasColumnType("INTEGER");
  322. b.HasKey("MembershipTagId", "MembershipSubAccountId");
  323. b.HasIndex("MembershipSubAccountId");
  324. b.ToTable("MembershipSubAccount_M2M_MembershipTags");
  325. });
  326. modelBuilder.Entity("Gateway.POS.Models.MembershipTag", b =>
  327. {
  328. b.Property<int>("Id")
  329. .ValueGeneratedOnAdd()
  330. .HasColumnType("INTEGER");
  331. b.Property<string>("Description")
  332. .HasColumnType("TEXT");
  333. b.Property<string>("Name")
  334. .HasColumnType("TEXT");
  335. b.HasKey("Id");
  336. b.HasIndex("Name")
  337. .IsUnique();
  338. b.ToTable("MembershipTags");
  339. });
  340. modelBuilder.Entity("Gateway.POS.Models.Operator", b =>
  341. {
  342. b.Property<int>("Id")
  343. .ValueGeneratedOnAdd()
  344. .HasColumnType("INTEGER");
  345. b.Property<DateTime>("CreatedTimestamp")
  346. .HasColumnType("TEXT");
  347. b.Property<string>("Description")
  348. .HasColumnType("TEXT");
  349. b.Property<string>("Name")
  350. .HasColumnType("TEXT");
  351. b.Property<string>("Password")
  352. .HasColumnType("TEXT");
  353. b.HasKey("Id");
  354. b.HasIndex("Name")
  355. .IsUnique();
  356. b.ToTable("Operators");
  357. });
  358. modelBuilder.Entity("Gateway.POS.Models.Payment", b =>
  359. {
  360. b.Property<int>("Id")
  361. .ValueGeneratedOnAdd()
  362. .HasColumnType("INTEGER");
  363. b.Property<string>("AuthCode")
  364. .HasColumnType("TEXT");
  365. b.Property<string>("BillNumber")
  366. .HasColumnType("TEXT");
  367. b.Property<string>("CardReaderName")
  368. .HasColumnType("TEXT");
  369. b.Property<string>("Comment")
  370. .HasColumnType("TEXT");
  371. b.Property<double>("ExpectAmount")
  372. .HasColumnType("REAL");
  373. b.Property<int>("Method")
  374. .HasColumnType("INTEGER");
  375. b.Property<double>("PaidAmount")
  376. .HasColumnType("REAL");
  377. b.Property<int?>("TargetMembershipAccountId")
  378. .HasColumnType("INTEGER");
  379. b.Property<int?>("TargetMembershipSubAccountId")
  380. .HasColumnType("INTEGER");
  381. b.Property<int>("TradeStatus")
  382. .HasColumnType("INTEGER");
  383. b.Property<int>("TransactionId")
  384. .HasColumnType("INTEGER");
  385. b.HasKey("Id");
  386. b.HasIndex("TransactionId");
  387. b.ToTable("Payments");
  388. });
  389. modelBuilder.Entity("Gateway.POS.Models.Transaction", b =>
  390. {
  391. b.Property<int>("Id")
  392. .ValueGeneratedOnAdd()
  393. .HasColumnType("INTEGER");
  394. b.Property<DateTime?>("ClientSideTimestamp")
  395. .HasColumnType("TEXT");
  396. b.Property<string>("Comment")
  397. .HasColumnType("TEXT");
  398. b.Property<int?>("MembershipProfitAccountRechargeId")
  399. .HasColumnType("INTEGER");
  400. b.Property<int?>("MembershipProfitAccountRedeemId")
  401. .HasColumnType("INTEGER");
  402. b.Property<double?>("NetAmount")
  403. .HasColumnType("REAL");
  404. b.Property<int>("OperatorId")
  405. .HasColumnType("INTEGER");
  406. b.Property<string>("ReceiptId")
  407. .HasColumnType("TEXT");
  408. b.Property<DateTime>("ServerSideTimestamp")
  409. .HasColumnType("TEXT");
  410. b.Property<string>("ShiftId")
  411. .HasColumnType("TEXT");
  412. b.Property<string>("SiteId")
  413. .HasColumnType("TEXT");
  414. b.Property<string>("TerminalId")
  415. .HasColumnType("TEXT");
  416. b.Property<double?>("TotalAmount")
  417. .HasColumnType("REAL");
  418. b.Property<int?>("TransactionSubType")
  419. .HasColumnType("INTEGER");
  420. b.Property<int>("TransactionType")
  421. .HasColumnType("INTEGER");
  422. b.HasKey("Id");
  423. b.HasIndex("Id")
  424. .IsUnique();
  425. b.HasIndex("NetAmount");
  426. b.HasIndex("OperatorId");
  427. b.HasIndex("ReceiptId")
  428. .IsUnique();
  429. b.HasIndex("ServerSideTimestamp");
  430. b.HasIndex("ShiftId");
  431. b.HasIndex("TotalAmount");
  432. b.ToTable("Transactions");
  433. });
  434. modelBuilder.Entity("Gateway.POS.Models.AppliedDiscount", b =>
  435. {
  436. b.HasOne("Gateway.POS.Models.Discount", "Discount")
  437. .WithMany()
  438. .HasForeignKey("DiscountId")
  439. .OnDelete(DeleteBehavior.Cascade)
  440. .IsRequired();
  441. b.HasOne("Gateway.POS.Models.Transaction", null)
  442. .WithMany("AppliedDiscounts")
  443. .HasForeignKey("TransactionId");
  444. b.Navigation("Discount");
  445. });
  446. modelBuilder.Entity("Gateway.POS.Models.FuelItem", b =>
  447. {
  448. b.HasOne("Gateway.POS.Models.Transaction", "Transaction")
  449. .WithMany("FuelItems")
  450. .HasForeignKey("TransactionId")
  451. .OnDelete(DeleteBehavior.Cascade)
  452. .IsRequired();
  453. b.Navigation("Transaction");
  454. });
  455. modelBuilder.Entity("Gateway.POS.Models.MembershipAccount", b =>
  456. {
  457. b.HasOne("Gateway.POS.Models.Operator", "CreateByOperator")
  458. .WithMany()
  459. .HasForeignKey("CreateByOperatorId");
  460. b.Navigation("CreateByOperator");
  461. });
  462. modelBuilder.Entity("Gateway.POS.Models.MembershipAccount_M2M_MembershipTag", b =>
  463. {
  464. b.HasOne("Gateway.POS.Models.MembershipAccount", "Account")
  465. .WithMany("AccountTags")
  466. .HasForeignKey("MembershipAccountId")
  467. .OnDelete(DeleteBehavior.Cascade)
  468. .IsRequired();
  469. b.HasOne("Gateway.POS.Models.MembershipTag", "Tag")
  470. .WithMany("AccountTags")
  471. .HasForeignKey("MembershipTagId")
  472. .OnDelete(DeleteBehavior.Cascade)
  473. .IsRequired();
  474. b.Navigation("Account");
  475. b.Navigation("Tag");
  476. });
  477. modelBuilder.Entity("Gateway.POS.Models.MembershipProfitAccount", b =>
  478. {
  479. b.HasOne("Gateway.POS.Models.MembershipAccount", "Account")
  480. .WithMany("ProfitAccounts")
  481. .HasForeignKey("MembershipAccountId");
  482. b.HasOne("Gateway.POS.Models.MembershipSubAccount", "SubAccount")
  483. .WithMany("ProfitAccounts")
  484. .HasForeignKey("MembershipSubAccountId");
  485. b.Navigation("Account");
  486. b.Navigation("SubAccount");
  487. });
  488. modelBuilder.Entity("Gateway.POS.Models.MembershipProfitAccountRecharge", b =>
  489. {
  490. b.HasOne("Gateway.POS.Models.Operator", "CreateByOperator")
  491. .WithMany()
  492. .HasForeignKey("CreateByOperatorId");
  493. b.HasOne("Gateway.POS.Models.MembershipProfitAccount", "ProfitAccount")
  494. .WithMany("ProfitRecharges")
  495. .HasForeignKey("MembershipProfitAccountId")
  496. .OnDelete(DeleteBehavior.Cascade)
  497. .IsRequired();
  498. b.HasOne("Gateway.POS.Models.Transaction", "SourceTrx")
  499. .WithOne("MembershipProfitAccountRecharge")
  500. .HasForeignKey("Gateway.POS.Models.MembershipProfitAccountRecharge", "SourceTrxId");
  501. b.Navigation("CreateByOperator");
  502. b.Navigation("ProfitAccount");
  503. b.Navigation("SourceTrx");
  504. });
  505. modelBuilder.Entity("Gateway.POS.Models.MembershipProfitAccountRedeem", b =>
  506. {
  507. b.HasOne("Gateway.POS.Models.Operator", "CreateByOperator")
  508. .WithMany()
  509. .HasForeignKey("CreateByOperatorId");
  510. b.HasOne("Gateway.POS.Models.MembershipProfitAccount", "ProfitAccount")
  511. .WithMany("ProfitRedeems")
  512. .HasForeignKey("MembershipProfitAccountId")
  513. .OnDelete(DeleteBehavior.Cascade)
  514. .IsRequired();
  515. b.HasOne("Gateway.POS.Models.Transaction", "SourceTrx")
  516. .WithOne("MembershipProfitAccountRedeem")
  517. .HasForeignKey("Gateway.POS.Models.MembershipProfitAccountRedeem", "SourceTrxId");
  518. b.Navigation("CreateByOperator");
  519. b.Navigation("ProfitAccount");
  520. b.Navigation("SourceTrx");
  521. });
  522. modelBuilder.Entity("Gateway.POS.Models.MembershipSubAccount", b =>
  523. {
  524. b.HasOne("Gateway.POS.Models.Operator", "CreateByOperator")
  525. .WithMany("OperatorCards")
  526. .HasForeignKey("CreateByOperatorId");
  527. b.HasOne("Gateway.POS.Models.MembershipAccount", "Account")
  528. .WithMany("SubAccounts")
  529. .HasForeignKey("MembershipAccountId")
  530. .OnDelete(DeleteBehavior.Cascade)
  531. .IsRequired();
  532. b.Navigation("Account");
  533. b.Navigation("CreateByOperator");
  534. });
  535. modelBuilder.Entity("Gateway.POS.Models.MembershipSubAccountIdentity", b =>
  536. {
  537. b.HasOne("Gateway.POS.Models.MembershipSubAccount", "SubAccount")
  538. .WithMany("Identities")
  539. .HasForeignKey("MembershipSubAccountId")
  540. .OnDelete(DeleteBehavior.Cascade)
  541. .IsRequired();
  542. b.Navigation("SubAccount");
  543. });
  544. modelBuilder.Entity("Gateway.POS.Models.MembershipSubAccount_M2M_MembershipTag", b =>
  545. {
  546. b.HasOne("Gateway.POS.Models.MembershipSubAccount", "SubAccount")
  547. .WithMany("SubAccountTags")
  548. .HasForeignKey("MembershipSubAccountId")
  549. .OnDelete(DeleteBehavior.Cascade)
  550. .IsRequired();
  551. b.HasOne("Gateway.POS.Models.MembershipTag", "Tag")
  552. .WithMany("SubAccountTags")
  553. .HasForeignKey("MembershipTagId")
  554. .OnDelete(DeleteBehavior.Cascade)
  555. .IsRequired();
  556. b.Navigation("SubAccount");
  557. b.Navigation("Tag");
  558. });
  559. modelBuilder.Entity("Gateway.POS.Models.Payment", b =>
  560. {
  561. b.HasOne("Gateway.POS.Models.Transaction", "Transaction")
  562. .WithMany("Payments")
  563. .HasForeignKey("TransactionId")
  564. .OnDelete(DeleteBehavior.Cascade)
  565. .IsRequired();
  566. b.Navigation("Transaction");
  567. });
  568. modelBuilder.Entity("Gateway.POS.Models.Transaction", b =>
  569. {
  570. b.HasOne("Gateway.POS.Models.Operator", "Operator")
  571. .WithMany()
  572. .HasForeignKey("OperatorId")
  573. .OnDelete(DeleteBehavior.Cascade)
  574. .IsRequired();
  575. b.Navigation("Operator");
  576. });
  577. modelBuilder.Entity("Gateway.POS.Models.MembershipAccount", b =>
  578. {
  579. b.Navigation("AccountTags");
  580. b.Navigation("ProfitAccounts");
  581. b.Navigation("SubAccounts");
  582. });
  583. modelBuilder.Entity("Gateway.POS.Models.MembershipProfitAccount", b =>
  584. {
  585. b.Navigation("ProfitRecharges");
  586. b.Navigation("ProfitRedeems");
  587. });
  588. modelBuilder.Entity("Gateway.POS.Models.MembershipSubAccount", b =>
  589. {
  590. b.Navigation("Identities");
  591. b.Navigation("ProfitAccounts");
  592. b.Navigation("SubAccountTags");
  593. });
  594. modelBuilder.Entity("Gateway.POS.Models.MembershipTag", b =>
  595. {
  596. b.Navigation("AccountTags");
  597. b.Navigation("SubAccountTags");
  598. });
  599. modelBuilder.Entity("Gateway.POS.Models.Operator", b =>
  600. {
  601. b.Navigation("OperatorCards");
  602. });
  603. modelBuilder.Entity("Gateway.POS.Models.Transaction", b =>
  604. {
  605. b.Navigation("AppliedDiscounts");
  606. b.Navigation("FuelItems");
  607. b.Navigation("MembershipProfitAccountRecharge");
  608. b.Navigation("MembershipProfitAccountRedeem");
  609. b.Navigation("Payments");
  610. });
  611. #pragma warning restore 612, 618
  612. }
  613. }
  614. }