AppDbContextModelSnapshot.cs 30 KB

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