20210525073538_addMembership.Designer.cs 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864
  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("20210525073538_addMembership")]
  12. partial class addMembership
  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<DateTime>("Timestamp")
  213. .HasColumnType("TEXT");
  214. b.HasKey("Id");
  215. b.HasIndex("CreateByOperatorId");
  216. b.HasIndex("MembershipProfitAccountId");
  217. b.ToTable("MembershipProfitAccountRecharges");
  218. });
  219. modelBuilder.Entity("Gateway.POS.Models.MembershipProfitAccountRedeem", b =>
  220. {
  221. b.Property<int>("Id")
  222. .ValueGeneratedOnAdd()
  223. .HasColumnType("INTEGER");
  224. b.Property<int?>("CreateByOperatorId")
  225. .HasColumnType("INTEGER");
  226. b.Property<string>("Description")
  227. .HasColumnType("TEXT");
  228. b.Property<int>("MembershipProfitAccountId")
  229. .HasColumnType("INTEGER");
  230. b.Property<decimal?>("ProfitAccountAmountBalance")
  231. .HasColumnType("TEXT");
  232. b.Property<string>("Purpose")
  233. .HasColumnType("TEXT");
  234. b.Property<double?>("RedeemedProfitAmount")
  235. .HasColumnType("REAL");
  236. b.Property<string>("RedeemedProfitComplexData")
  237. .HasColumnType("TEXT");
  238. b.Property<DateTime>("Timestamp")
  239. .HasColumnType("TEXT");
  240. b.HasKey("Id");
  241. b.HasIndex("CreateByOperatorId");
  242. b.HasIndex("MembershipProfitAccountId");
  243. b.ToTable("MembershipProfitAccountRedeems");
  244. });
  245. modelBuilder.Entity("Gateway.POS.Models.MembershipSubAccount", b =>
  246. {
  247. b.Property<int>("Id")
  248. .ValueGeneratedOnAdd()
  249. .HasColumnType("INTEGER");
  250. b.Property<int>("AccountState")
  251. .HasColumnType("INTEGER");
  252. b.Property<string>("ConsumeRestrictionComplexData")
  253. .HasColumnType("TEXT");
  254. b.Property<int?>("CreateByOperatorId")
  255. .HasColumnType("INTEGER");
  256. b.Property<string>("Description")
  257. .HasColumnType("TEXT");
  258. b.Property<bool>("EnableProfitAccountBalanceChangeNotify")
  259. .HasColumnType("INTEGER");
  260. b.Property<string>("LastAccountStateUpdateReason")
  261. .HasColumnType("TEXT");
  262. b.Property<DateTime?>("LastAccountStateUpdateTime")
  263. .HasColumnType("TEXT");
  264. b.Property<int>("MembershipAccountId")
  265. .HasColumnType("INTEGER");
  266. b.Property<int?>("MembershipLevel")
  267. .HasColumnType("INTEGER");
  268. b.Property<DateTime>("ServerSideCreatedTimestamp")
  269. .HasColumnType("TEXT");
  270. b.Property<DateTime?>("ServerSideLastModifiedTimestamp")
  271. .HasColumnType("TEXT");
  272. b.Property<string>("SubAccountHolderAddress")
  273. .HasColumnType("TEXT");
  274. b.Property<string>("SubAccountHolderEmail")
  275. .HasColumnType("TEXT");
  276. b.Property<string>("SubAccountHolderName")
  277. .HasColumnType("TEXT");
  278. b.Property<string>("SubAccountHolderPhoneNumber")
  279. .HasColumnType("TEXT");
  280. b.Property<DateTime?>("SuspendStateEndTime")
  281. .HasColumnType("TEXT");
  282. b.Property<DateTime?>("SuspendStateStartTime")
  283. .HasColumnType("TEXT");
  284. b.HasKey("Id");
  285. b.HasIndex("CreateByOperatorId");
  286. b.HasIndex("MembershipAccountId");
  287. b.ToTable("MembershipSubAccounts");
  288. });
  289. modelBuilder.Entity("Gateway.POS.Models.MembershipSubAccountIdentity", b =>
  290. {
  291. b.Property<int>("Id")
  292. .ValueGeneratedOnAdd()
  293. .HasColumnType("INTEGER");
  294. b.Property<string>("Description")
  295. .HasColumnType("TEXT");
  296. b.Property<string>("Identity")
  297. .HasColumnType("TEXT");
  298. b.Property<int>("IdentityCarrierType")
  299. .HasColumnType("INTEGER");
  300. b.Property<int>("MembershipSubAccountId")
  301. .HasColumnType("INTEGER");
  302. b.HasKey("Id");
  303. b.HasIndex("MembershipSubAccountId", "Identity", "IdentityCarrierType")
  304. .IsUnique();
  305. b.ToTable("MembershipSubAccountIdentities");
  306. });
  307. modelBuilder.Entity("Gateway.POS.Models.MembershipSubAccount_M2M_MembershipTag", b =>
  308. {
  309. b.Property<int>("MembershipTagId")
  310. .HasColumnType("INTEGER");
  311. b.Property<int>("MembershipSubAccountId")
  312. .HasColumnType("INTEGER");
  313. b.HasKey("MembershipTagId", "MembershipSubAccountId");
  314. b.HasIndex("MembershipSubAccountId");
  315. b.ToTable("MembershipSubAccount_M2M_MembershipTags");
  316. });
  317. modelBuilder.Entity("Gateway.POS.Models.MembershipTag", b =>
  318. {
  319. b.Property<int>("Id")
  320. .ValueGeneratedOnAdd()
  321. .HasColumnType("INTEGER");
  322. b.Property<string>("Description")
  323. .HasColumnType("TEXT");
  324. b.Property<string>("Name")
  325. .HasColumnType("TEXT");
  326. b.HasKey("Id");
  327. b.HasIndex("Name")
  328. .IsUnique();
  329. b.ToTable("MembershipTags");
  330. });
  331. modelBuilder.Entity("Gateway.POS.Models.Operator", b =>
  332. {
  333. b.Property<int>("Id")
  334. .ValueGeneratedOnAdd()
  335. .HasColumnType("INTEGER");
  336. b.Property<DateTime>("CreatedTimestamp")
  337. .HasColumnType("TEXT");
  338. b.Property<string>("Description")
  339. .HasColumnType("TEXT");
  340. b.Property<string>("Name")
  341. .HasColumnType("TEXT");
  342. b.Property<string>("Password")
  343. .HasColumnType("TEXT");
  344. b.HasKey("Id");
  345. b.HasIndex("Name")
  346. .IsUnique();
  347. b.ToTable("Operators");
  348. });
  349. modelBuilder.Entity("Gateway.POS.Models.Payment", b =>
  350. {
  351. b.Property<int>("Id")
  352. .ValueGeneratedOnAdd()
  353. .HasColumnType("INTEGER");
  354. b.Property<string>("AuthCode")
  355. .HasColumnType("TEXT");
  356. b.Property<string>("BillNumber")
  357. .HasColumnType("TEXT");
  358. b.Property<string>("CardReaderName")
  359. .HasColumnType("TEXT");
  360. b.Property<string>("Comment")
  361. .HasColumnType("TEXT");
  362. b.Property<double>("ExpectAmount")
  363. .HasColumnType("REAL");
  364. b.Property<int>("Method")
  365. .HasColumnType("INTEGER");
  366. b.Property<double>("PaidAmount")
  367. .HasColumnType("REAL");
  368. b.Property<int?>("TargetMembershipAccountId")
  369. .HasColumnType("INTEGER");
  370. b.Property<int?>("TargetMembershipSubAccountId")
  371. .HasColumnType("INTEGER");
  372. b.Property<int>("TradeStatus")
  373. .HasColumnType("INTEGER");
  374. b.Property<int>("TransactionId")
  375. .HasColumnType("INTEGER");
  376. b.HasKey("Id");
  377. b.HasIndex("TransactionId");
  378. b.ToTable("Payments");
  379. });
  380. modelBuilder.Entity("Gateway.POS.Models.Transaction", b =>
  381. {
  382. b.Property<int>("Id")
  383. .ValueGeneratedOnAdd()
  384. .HasColumnType("INTEGER");
  385. b.Property<DateTime?>("ClientSideTimestamp")
  386. .HasColumnType("TEXT");
  387. b.Property<string>("Comment")
  388. .HasColumnType("TEXT");
  389. b.Property<int?>("MembershipProfitAccountRechargeId")
  390. .HasColumnType("INTEGER");
  391. b.Property<int?>("MembershipProfitAccountRedeemId")
  392. .HasColumnType("INTEGER");
  393. b.Property<double?>("NetAmount")
  394. .HasColumnType("REAL");
  395. b.Property<int>("OperatorId")
  396. .HasColumnType("INTEGER");
  397. b.Property<string>("ReceiptId")
  398. .HasColumnType("TEXT");
  399. b.Property<DateTime>("ServerSideTimestamp")
  400. .HasColumnType("TEXT");
  401. b.Property<string>("ShiftId")
  402. .HasColumnType("TEXT");
  403. b.Property<string>("SiteId")
  404. .HasColumnType("TEXT");
  405. b.Property<string>("TerminalId")
  406. .HasColumnType("TEXT");
  407. b.Property<double?>("TotalAmount")
  408. .HasColumnType("REAL");
  409. b.Property<int?>("TransactionSubType")
  410. .HasColumnType("INTEGER");
  411. b.Property<int>("TransactionType")
  412. .HasColumnType("INTEGER");
  413. b.HasKey("Id");
  414. b.HasIndex("Id")
  415. .IsUnique();
  416. b.HasIndex("MembershipProfitAccountRechargeId");
  417. b.HasIndex("MembershipProfitAccountRedeemId");
  418. b.HasIndex("NetAmount");
  419. b.HasIndex("OperatorId");
  420. b.HasIndex("ReceiptId")
  421. .IsUnique();
  422. b.HasIndex("ServerSideTimestamp");
  423. b.HasIndex("ShiftId");
  424. b.HasIndex("TotalAmount");
  425. b.ToTable("Transactions");
  426. });
  427. modelBuilder.Entity("Gateway.POS.Models.AppliedDiscount", b =>
  428. {
  429. b.HasOne("Gateway.POS.Models.Discount", "Discount")
  430. .WithMany()
  431. .HasForeignKey("DiscountId")
  432. .OnDelete(DeleteBehavior.Cascade)
  433. .IsRequired();
  434. b.HasOne("Gateway.POS.Models.Transaction", null)
  435. .WithMany("AppliedDiscounts")
  436. .HasForeignKey("TransactionId");
  437. b.Navigation("Discount");
  438. });
  439. modelBuilder.Entity("Gateway.POS.Models.FuelItem", b =>
  440. {
  441. b.HasOne("Gateway.POS.Models.Transaction", "Transaction")
  442. .WithMany("FuelItems")
  443. .HasForeignKey("TransactionId")
  444. .OnDelete(DeleteBehavior.Cascade)
  445. .IsRequired();
  446. b.Navigation("Transaction");
  447. });
  448. modelBuilder.Entity("Gateway.POS.Models.MembershipAccount", b =>
  449. {
  450. b.HasOne("Gateway.POS.Models.Operator", "CreateByOperator")
  451. .WithMany()
  452. .HasForeignKey("CreateByOperatorId");
  453. b.Navigation("CreateByOperator");
  454. });
  455. modelBuilder.Entity("Gateway.POS.Models.MembershipAccount_M2M_MembershipTag", b =>
  456. {
  457. b.HasOne("Gateway.POS.Models.MembershipAccount", "Account")
  458. .WithMany("AccountTags")
  459. .HasForeignKey("MembershipAccountId")
  460. .OnDelete(DeleteBehavior.Cascade)
  461. .IsRequired();
  462. b.HasOne("Gateway.POS.Models.MembershipTag", "Tag")
  463. .WithMany("AccountTags")
  464. .HasForeignKey("MembershipTagId")
  465. .OnDelete(DeleteBehavior.Cascade)
  466. .IsRequired();
  467. b.Navigation("Account");
  468. b.Navigation("Tag");
  469. });
  470. modelBuilder.Entity("Gateway.POS.Models.MembershipProfitAccount", b =>
  471. {
  472. b.HasOne("Gateway.POS.Models.MembershipAccount", "Account")
  473. .WithMany("ProfitAccounts")
  474. .HasForeignKey("MembershipAccountId");
  475. b.HasOne("Gateway.POS.Models.MembershipSubAccount", "SubAccount")
  476. .WithMany("ProfitAccounts")
  477. .HasForeignKey("MembershipSubAccountId");
  478. b.Navigation("Account");
  479. b.Navigation("SubAccount");
  480. });
  481. modelBuilder.Entity("Gateway.POS.Models.MembershipProfitAccountRecharge", b =>
  482. {
  483. b.HasOne("Gateway.POS.Models.Operator", "CreateByOperator")
  484. .WithMany()
  485. .HasForeignKey("CreateByOperatorId");
  486. b.HasOne("Gateway.POS.Models.MembershipProfitAccount", "ProfitAccount")
  487. .WithMany("ProfitRecharges")
  488. .HasForeignKey("MembershipProfitAccountId")
  489. .OnDelete(DeleteBehavior.Cascade)
  490. .IsRequired();
  491. b.Navigation("CreateByOperator");
  492. b.Navigation("ProfitAccount");
  493. });
  494. modelBuilder.Entity("Gateway.POS.Models.MembershipProfitAccountRedeem", b =>
  495. {
  496. b.HasOne("Gateway.POS.Models.Operator", "CreateByOperator")
  497. .WithMany()
  498. .HasForeignKey("CreateByOperatorId");
  499. b.HasOne("Gateway.POS.Models.MembershipProfitAccount", "ProfitAccount")
  500. .WithMany("ProfitRedeems")
  501. .HasForeignKey("MembershipProfitAccountId")
  502. .OnDelete(DeleteBehavior.Cascade)
  503. .IsRequired();
  504. b.Navigation("CreateByOperator");
  505. b.Navigation("ProfitAccount");
  506. });
  507. modelBuilder.Entity("Gateway.POS.Models.MembershipSubAccount", b =>
  508. {
  509. b.HasOne("Gateway.POS.Models.Operator", "CreateByOperator")
  510. .WithMany("OperatorCards")
  511. .HasForeignKey("CreateByOperatorId");
  512. b.HasOne("Gateway.POS.Models.MembershipAccount", "Account")
  513. .WithMany("SubAccounts")
  514. .HasForeignKey("MembershipAccountId")
  515. .OnDelete(DeleteBehavior.Cascade)
  516. .IsRequired();
  517. b.Navigation("Account");
  518. b.Navigation("CreateByOperator");
  519. });
  520. modelBuilder.Entity("Gateway.POS.Models.MembershipSubAccountIdentity", b =>
  521. {
  522. b.HasOne("Gateway.POS.Models.MembershipSubAccount", "SubAccount")
  523. .WithMany("Identities")
  524. .HasForeignKey("MembershipSubAccountId")
  525. .OnDelete(DeleteBehavior.Cascade)
  526. .IsRequired();
  527. b.Navigation("SubAccount");
  528. });
  529. modelBuilder.Entity("Gateway.POS.Models.MembershipSubAccount_M2M_MembershipTag", b =>
  530. {
  531. b.HasOne("Gateway.POS.Models.MembershipSubAccount", "SubAccount")
  532. .WithMany("SubAccountTags")
  533. .HasForeignKey("MembershipSubAccountId")
  534. .OnDelete(DeleteBehavior.Cascade)
  535. .IsRequired();
  536. b.HasOne("Gateway.POS.Models.MembershipTag", "Tag")
  537. .WithMany("SubAccountTags")
  538. .HasForeignKey("MembershipTagId")
  539. .OnDelete(DeleteBehavior.Cascade)
  540. .IsRequired();
  541. b.Navigation("SubAccount");
  542. b.Navigation("Tag");
  543. });
  544. modelBuilder.Entity("Gateway.POS.Models.Payment", b =>
  545. {
  546. b.HasOne("Gateway.POS.Models.Transaction", "Transaction")
  547. .WithMany("Payments")
  548. .HasForeignKey("TransactionId")
  549. .OnDelete(DeleteBehavior.Cascade)
  550. .IsRequired();
  551. b.Navigation("Transaction");
  552. });
  553. modelBuilder.Entity("Gateway.POS.Models.Transaction", b =>
  554. {
  555. b.HasOne("Gateway.POS.Models.MembershipProfitAccountRecharge", "MembershipProfitAccountRecharge")
  556. .WithMany()
  557. .HasForeignKey("MembershipProfitAccountRechargeId");
  558. b.HasOne("Gateway.POS.Models.MembershipProfitAccountRedeem", "MembershipProfitAccountRedeem")
  559. .WithMany()
  560. .HasForeignKey("MembershipProfitAccountRedeemId");
  561. b.HasOne("Gateway.POS.Models.Operator", "Operator")
  562. .WithMany()
  563. .HasForeignKey("OperatorId")
  564. .OnDelete(DeleteBehavior.Cascade)
  565. .IsRequired();
  566. b.Navigation("MembershipProfitAccountRecharge");
  567. b.Navigation("MembershipProfitAccountRedeem");
  568. b.Navigation("Operator");
  569. });
  570. modelBuilder.Entity("Gateway.POS.Models.MembershipAccount", b =>
  571. {
  572. b.Navigation("AccountTags");
  573. b.Navigation("ProfitAccounts");
  574. b.Navigation("SubAccounts");
  575. });
  576. modelBuilder.Entity("Gateway.POS.Models.MembershipProfitAccount", b =>
  577. {
  578. b.Navigation("ProfitRecharges");
  579. b.Navigation("ProfitRedeems");
  580. });
  581. modelBuilder.Entity("Gateway.POS.Models.MembershipSubAccount", b =>
  582. {
  583. b.Navigation("Identities");
  584. b.Navigation("ProfitAccounts");
  585. b.Navigation("SubAccountTags");
  586. });
  587. modelBuilder.Entity("Gateway.POS.Models.MembershipTag", b =>
  588. {
  589. b.Navigation("AccountTags");
  590. b.Navigation("SubAccountTags");
  591. });
  592. modelBuilder.Entity("Gateway.POS.Models.Operator", b =>
  593. {
  594. b.Navigation("OperatorCards");
  595. });
  596. modelBuilder.Entity("Gateway.POS.Models.Transaction", b =>
  597. {
  598. b.Navigation("AppliedDiscounts");
  599. b.Navigation("FuelItems");
  600. b.Navigation("Payments");
  601. });
  602. #pragma warning restore 612, 618
  603. }
  604. }
  605. }