API
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

DataContextModelSnapshot.cs 32KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026
  1. // <auto-generated />
  2. using System;
  3. using Microsoft.EntityFrameworkCore;
  4. using Microsoft.EntityFrameworkCore.Infrastructure;
  5. using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
  6. using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
  7. using UnivateProperties_API.Context;
  8. namespace UnivateProperties_API.Migrations
  9. {
  10. [DbContext(typeof(DataContext))]
  11. partial class DataContextModelSnapshot : ModelSnapshot
  12. {
  13. protected override void BuildModel(ModelBuilder modelBuilder)
  14. {
  15. #pragma warning disable 612, 618
  16. modelBuilder
  17. .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn)
  18. .HasAnnotation("ProductVersion", "2.2.6-servicing-10079")
  19. .HasAnnotation("Relational:MaxIdentifierLength", 63);
  20. modelBuilder.Entity("UnivateProperties_API.Model.Banks.Bank", b =>
  21. {
  22. b.Property<int>("Id")
  23. .ValueGeneratedOnAdd();
  24. b.Property<DateTime>("Created");
  25. b.Property<DateTime>("Modified");
  26. b.Property<string>("ModifiedBy");
  27. b.Property<string>("Name");
  28. b.Property<string>("UniversalBranchCode");
  29. b.HasKey("Id");
  30. b.ToTable("Banks");
  31. });
  32. modelBuilder.Entity("UnivateProperties_API.Model.Banks.BankAccount", b =>
  33. {
  34. b.Property<int>("Id")
  35. .ValueGeneratedOnAdd();
  36. b.Property<string>("AccountHolder");
  37. b.Property<string>("AccountNumber");
  38. b.Property<int>("BankId");
  39. b.Property<DateTime>("Created");
  40. b.Property<DateTime>("Modified");
  41. b.Property<string>("ModifiedBy");
  42. b.Property<int?>("OwnerId");
  43. b.HasKey("Id");
  44. b.HasIndex("BankId");
  45. b.HasIndex("OwnerId");
  46. b.ToTable("BankAccounts");
  47. });
  48. modelBuilder.Entity("UnivateProperties_API.Model.Communication.Email", b =>
  49. {
  50. b.Property<int>("Id")
  51. .ValueGeneratedOnAdd();
  52. b.Property<string>("BCC");
  53. b.Property<string>("Body");
  54. b.Property<string>("CC");
  55. b.Property<string>("Comment");
  56. b.Property<DateTime>("Created");
  57. b.Property<bool>("IsBodyHtml");
  58. b.Property<DateTime>("Modified");
  59. b.Property<string>("ModifiedBy");
  60. b.Property<int>("SenderId");
  61. b.Property<string>("Subject");
  62. b.Property<string>("To");
  63. b.Property<string>("ToDisplay");
  64. b.HasKey("Id");
  65. b.HasIndex("SenderId");
  66. b.ToTable("Emails");
  67. });
  68. modelBuilder.Entity("UnivateProperties_API.Model.Communication.SMTPAccount", b =>
  69. {
  70. b.Property<int>("Id")
  71. .ValueGeneratedOnAdd();
  72. b.Property<string>("Address");
  73. b.Property<DateTime>("Created");
  74. b.Property<string>("DisplayName");
  75. b.Property<DateTime>("Modified");
  76. b.Property<string>("ModifiedBy");
  77. b.Property<int>("SMTPHostId");
  78. b.HasKey("Id");
  79. b.HasIndex("SMTPHostId");
  80. b.ToTable("Accounts");
  81. });
  82. modelBuilder.Entity("UnivateProperties_API.Model.Communication.SMTPHost", b =>
  83. {
  84. b.Property<int>("Id")
  85. .ValueGeneratedOnAdd();
  86. b.Property<DateTime>("Created");
  87. b.Property<string>("Host");
  88. b.Property<DateTime>("Modified");
  89. b.Property<string>("ModifiedBy");
  90. b.Property<bool>("NeedsAuthorize");
  91. b.Property<string>("Password");
  92. b.Property<bool>("UseSSL");
  93. b.Property<string>("User");
  94. b.HasKey("Id");
  95. b.ToTable("Hosts");
  96. });
  97. modelBuilder.Entity("UnivateProperties_API.Model.Logging.SearchLog", b =>
  98. {
  99. b.Property<int>("Id")
  100. .ValueGeneratedOnAdd();
  101. b.Property<DateTime>("Created");
  102. b.Property<DateTime>("Modified");
  103. b.Property<string>("ModifiedBy");
  104. b.Property<string>("Search");
  105. b.Property<string>("Type");
  106. b.HasKey("Id");
  107. b.ToTable("SearchLogs");
  108. });
  109. modelBuilder.Entity("UnivateProperties_API.Model.Misc.Address", b =>
  110. {
  111. b.Property<int>("Id")
  112. .ValueGeneratedOnAdd();
  113. b.Property<string>("City");
  114. b.Property<DateTime>("Created");
  115. b.Property<DateTime>("Modified");
  116. b.Property<string>("ModifiedBy");
  117. b.Property<string>("PostalCode");
  118. b.Property<string>("Street");
  119. b.Property<string>("StreetNumber");
  120. b.Property<string>("Suburb");
  121. b.HasKey("Id");
  122. b.ToTable("Addresses");
  123. });
  124. modelBuilder.Entity("UnivateProperties_API.Model.ProcessFlow.BidItem", b =>
  125. {
  126. b.Property<int>("Id")
  127. .ValueGeneratedOnAdd();
  128. b.Property<double>("Amount");
  129. b.Property<int?>("BidMakerId");
  130. b.Property<string>("Comment");
  131. b.Property<DateTime>("Created");
  132. b.Property<string>("DeclinedReason");
  133. b.Property<DateTime>("Modified");
  134. b.Property<string>("ModifiedBy");
  135. b.Property<int?>("PropertyId");
  136. b.Property<int?>("StatusId");
  137. b.Property<int?>("TimeshareWeekId");
  138. b.HasKey("Id");
  139. b.HasIndex("BidMakerId");
  140. b.HasIndex("PropertyId");
  141. b.HasIndex("StatusId");
  142. b.HasIndex("TimeshareWeekId");
  143. b.ToTable("BidItems");
  144. });
  145. modelBuilder.Entity("UnivateProperties_API.Model.ProcessFlow.ProcessFlow", b =>
  146. {
  147. b.Property<int>("Id")
  148. .ValueGeneratedOnAdd();
  149. b.Property<DateTime>("Created");
  150. b.Property<DateTime>("Modified");
  151. b.Property<string>("ModifiedBy");
  152. b.Property<int?>("PropertyID");
  153. b.Property<int>("StatusID");
  154. b.Property<int?>("TimeshareID");
  155. b.HasKey("Id");
  156. b.HasIndex("PropertyID");
  157. b.HasIndex("StatusID");
  158. b.HasIndex("TimeshareID");
  159. b.ToTable("ProcessFlows");
  160. });
  161. modelBuilder.Entity("UnivateProperties_API.Model.Properties.Property", b =>
  162. {
  163. b.Property<int>("Id")
  164. .ValueGeneratedOnAdd();
  165. b.Property<string>("AddressLine1");
  166. b.Property<string>("AddressLine2");
  167. b.Property<string>("AddressLine3");
  168. b.Property<int?>("AgencyId");
  169. b.Property<int?>("AgentId");
  170. b.Property<int>("CityId");
  171. b.Property<DateTime>("Created");
  172. b.Property<string>("Description");
  173. b.Property<bool>("IsSale");
  174. b.Property<DateTime>("Modified");
  175. b.Property<string>("ModifiedBy");
  176. b.Property<decimal>("OperationalCosts");
  177. b.Property<int?>("OwnerId");
  178. b.Property<decimal>("Price");
  179. b.Property<string>("PricePer");
  180. b.Property<string>("PropertyName");
  181. b.Property<int>("PropertyTypeId");
  182. b.Property<int>("ProvinceId");
  183. b.Property<bool>("Published");
  184. b.Property<string>("ShortDescription");
  185. b.Property<int?>("StatusId");
  186. b.Property<int>("SuburbId");
  187. b.Property<string>("Unit");
  188. b.HasKey("Id");
  189. b.HasIndex("AgencyId");
  190. b.HasIndex("AgentId");
  191. b.HasIndex("CityId");
  192. b.HasIndex("OwnerId");
  193. b.HasIndex("PropertyTypeId");
  194. b.HasIndex("ProvinceId");
  195. b.HasIndex("StatusId");
  196. b.HasIndex("SuburbId");
  197. b.ToTable("Properties");
  198. });
  199. modelBuilder.Entity("UnivateProperties_API.Model.Properties.PropertyImage", b =>
  200. {
  201. b.Property<int>("Id")
  202. .ValueGeneratedOnAdd();
  203. b.Property<DateTime>("Created");
  204. b.Property<string>("Image");
  205. b.Property<bool>("IsDefault");
  206. b.Property<DateTime>("Modified");
  207. b.Property<string>("ModifiedBy");
  208. b.Property<int>("PropertyId");
  209. b.HasKey("Id");
  210. b.HasIndex("PropertyId");
  211. b.ToTable("PropertyImages");
  212. });
  213. modelBuilder.Entity("UnivateProperties_API.Model.Properties.PropertyType", b =>
  214. {
  215. b.Property<int>("Id")
  216. .ValueGeneratedOnAdd();
  217. b.Property<DateTime>("Created");
  218. b.Property<string>("Description");
  219. b.Property<DateTime>("Modified");
  220. b.Property<string>("ModifiedBy");
  221. b.Property<int>("UsageType");
  222. b.HasKey("Id");
  223. b.ToTable("PropertyTypes");
  224. });
  225. modelBuilder.Entity("UnivateProperties_API.Model.Properties.PropertyUserField", b =>
  226. {
  227. b.Property<int>("Id")
  228. .ValueGeneratedOnAdd();
  229. b.Property<DateTime>("Created");
  230. b.Property<string>("Description");
  231. b.Property<DateTime>("Modified");
  232. b.Property<string>("ModifiedBy");
  233. b.Property<int>("PropertyId");
  234. b.Property<int>("UserDefinedFieldId");
  235. b.Property<string>("Value");
  236. b.HasKey("Id");
  237. b.HasIndex("PropertyId");
  238. b.HasIndex("UserDefinedFieldId");
  239. b.ToTable("PropertyUserFields");
  240. });
  241. modelBuilder.Entity("UnivateProperties_API.Model.Properties.UserDefinedField", b =>
  242. {
  243. b.Property<int>("Id")
  244. .ValueGeneratedOnAdd();
  245. b.Property<DateTime>("Created");
  246. b.Property<string>("FieldName");
  247. b.Property<string>("FieldType");
  248. b.Property<int>("GroupId");
  249. b.Property<DateTime>("Modified");
  250. b.Property<string>("ModifiedBy");
  251. b.Property<int>("Rank");
  252. b.HasKey("Id");
  253. b.HasIndex("GroupId");
  254. b.ToTable("UserDefinedFields");
  255. });
  256. modelBuilder.Entity("UnivateProperties_API.Model.Properties.UserDefinedGroup", b =>
  257. {
  258. b.Property<int>("Id")
  259. .ValueGeneratedOnAdd();
  260. b.Property<DateTime>("Created");
  261. b.Property<string>("Description");
  262. b.Property<DateTime>("Modified");
  263. b.Property<string>("ModifiedBy");
  264. b.Property<int>("Rank");
  265. b.Property<int>("UsageType");
  266. b.HasKey("Id");
  267. b.ToTable("UserDefinedGroups");
  268. });
  269. modelBuilder.Entity("UnivateProperties_API.Model.Region.City", b =>
  270. {
  271. b.Property<int>("Id")
  272. .ValueGeneratedOnAdd();
  273. b.Property<string>("Code");
  274. b.Property<DateTime>("Created");
  275. b.Property<string>("Description");
  276. b.Property<DateTime>("Modified");
  277. b.Property<string>("ModifiedBy");
  278. b.Property<int>("ProvinceId");
  279. b.HasKey("Id");
  280. b.HasIndex("ProvinceId");
  281. b.ToTable("Cities");
  282. });
  283. modelBuilder.Entity("UnivateProperties_API.Model.Region.Province", b =>
  284. {
  285. b.Property<int>("Id")
  286. .ValueGeneratedOnAdd();
  287. b.Property<string>("Code");
  288. b.Property<DateTime>("Created");
  289. b.Property<string>("Description");
  290. b.Property<DateTime>("Modified");
  291. b.Property<string>("ModifiedBy");
  292. b.HasKey("Id");
  293. b.ToTable("Provinces");
  294. });
  295. modelBuilder.Entity("UnivateProperties_API.Model.Region.Suburb", b =>
  296. {
  297. b.Property<int>("Id")
  298. .ValueGeneratedOnAdd();
  299. b.Property<int>("CityId");
  300. b.Property<DateTime>("Created");
  301. b.Property<string>("Description");
  302. b.Property<DateTime>("Modified");
  303. b.Property<string>("ModifiedBy");
  304. b.Property<string>("PostalCode");
  305. b.HasKey("Id");
  306. b.HasIndex("CityId");
  307. b.ToTable("Suburbs");
  308. });
  309. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.Season", b =>
  310. {
  311. b.Property<int>("Id")
  312. .ValueGeneratedOnAdd();
  313. b.Property<DateTime>("Created");
  314. b.Property<DateTime>("Modified");
  315. b.Property<string>("ModifiedBy");
  316. b.Property<string>("Name");
  317. b.HasKey("Id");
  318. b.ToTable("Seasons");
  319. });
  320. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.Status", b =>
  321. {
  322. b.Property<int>("Id")
  323. .ValueGeneratedOnAdd();
  324. b.Property<string>("Code");
  325. b.Property<DateTime>("Created");
  326. b.Property<string>("Description");
  327. b.Property<DateTime>("Modified");
  328. b.Property<string>("ModifiedBy");
  329. b.Property<int>("StatusType");
  330. b.HasKey("Id");
  331. b.ToTable("Status");
  332. });
  333. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.TimeshareWeek", b =>
  334. {
  335. b.Property<int>("Id")
  336. .ValueGeneratedOnAdd();
  337. b.Property<int?>("AgencyId");
  338. b.Property<bool>("AgentAsRep");
  339. b.Property<int?>("AgentId");
  340. b.Property<DateTime>("ArrivalDate");
  341. b.Property<string>("BankedWith");
  342. b.Property<int>("Bedrooms");
  343. b.Property<DateTime>("Created");
  344. b.Property<bool>("CurrentYearBanked");
  345. b.Property<DateTime>("DepartureDate");
  346. b.Property<bool>("LeviesPaidInFull");
  347. b.Property<double>("LevyAmount");
  348. b.Property<int>("MaxSleep");
  349. b.Property<DateTime>("Modified");
  350. b.Property<string>("ModifiedBy");
  351. b.Property<string>("Module");
  352. b.Property<DateTime>("OriginalPurchaseDate");
  353. b.Property<double>("OriginalPurchasePrice");
  354. b.Property<bool>("OtherResort");
  355. b.Property<int>("OwnerId");
  356. b.Property<bool>("ReferedByAgent");
  357. b.Property<int>("RegionId");
  358. b.Property<string>("ResortCode");
  359. b.Property<string>("ResortName");
  360. b.Property<string>("Season");
  361. b.Property<double>("SellPrice");
  362. b.Property<int>("StatusId");
  363. b.Property<string>("UnitNumber");
  364. b.Property<string>("WeekNumber");
  365. b.Property<bool>("WeekPlacedForRental");
  366. b.HasKey("Id");
  367. b.HasIndex("AgencyId");
  368. b.HasIndex("AgentId");
  369. b.HasIndex("OwnerId");
  370. b.HasIndex("RegionId");
  371. b.HasIndex("StatusId");
  372. b.ToTable("Weeks");
  373. });
  374. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.UnitConfiguration", b =>
  375. {
  376. b.Property<int>("Id")
  377. .ValueGeneratedOnAdd();
  378. b.Property<int>("Adults");
  379. b.Property<int>("Bedrooms");
  380. b.Property<int>("Children");
  381. b.Property<string>("Code");
  382. b.Property<DateTime>("Created");
  383. b.Property<DateTime>("Modified");
  384. b.Property<string>("ModifiedBy");
  385. b.HasKey("Id");
  386. b.HasIndex("Code")
  387. .IsUnique();
  388. b.ToTable("UnitConfigurations");
  389. });
  390. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.UnitConfigurationType", b =>
  391. {
  392. b.Property<int>("Id")
  393. .ValueGeneratedOnAdd();
  394. b.Property<DateTime>("Created");
  395. b.Property<string>("Description");
  396. b.Property<DateTime>("Modified");
  397. b.Property<string>("ModifiedBy");
  398. b.Property<int>("UnitConfigurationId");
  399. b.HasKey("Id");
  400. b.HasIndex("UnitConfigurationId");
  401. b.ToTable("UnitConfigurationTypes");
  402. });
  403. modelBuilder.Entity("UnivateProperties_API.Model.Users.Agency", b =>
  404. {
  405. b.Property<int>("Id")
  406. .ValueGeneratedOnAdd();
  407. b.Property<string>("AgencyName");
  408. b.Property<string>("CompanyRegNumber");
  409. b.Property<DateTime>("Created");
  410. b.Property<string>("EAABEFFCNumber");
  411. b.Property<DateTime>("Modified");
  412. b.Property<string>("ModifiedBy");
  413. b.HasKey("Id");
  414. b.ToTable("Agencies");
  415. });
  416. modelBuilder.Entity("UnivateProperties_API.Model.Users.Agent", b =>
  417. {
  418. b.Property<int>("Id")
  419. .ValueGeneratedOnAdd();
  420. b.Property<int?>("AgencyId");
  421. b.Property<string>("CellNumber");
  422. b.Property<DateTime>("Created");
  423. b.Property<string>("Email");
  424. b.Property<DateTime>("Modified");
  425. b.Property<string>("ModifiedBy");
  426. b.Property<string>("Name");
  427. b.Property<string>("Surname");
  428. b.Property<string>("Telephone");
  429. b.Property<int?>("UserId");
  430. b.HasKey("Id");
  431. b.HasIndex("AgencyId");
  432. b.HasIndex("UserId");
  433. b.ToTable("Agents");
  434. });
  435. modelBuilder.Entity("UnivateProperties_API.Model.Users.Individual", b =>
  436. {
  437. b.Property<int>("Id")
  438. .ValueGeneratedOnAdd();
  439. b.Property<int?>("AddressId");
  440. b.Property<string>("CellNumber");
  441. b.Property<string>("CompanyRegNumber");
  442. b.Property<DateTime>("Created");
  443. b.Property<string>("Email");
  444. b.Property<string>("IdNumber");
  445. b.Property<string>("IncomeTaxNumber");
  446. b.Property<string>("MaritalStatus");
  447. b.Property<DateTime>("Modified");
  448. b.Property<string>("ModifiedBy");
  449. b.Property<string>("Name");
  450. b.Property<string>("Surname");
  451. b.Property<string>("Telephone");
  452. b.Property<int?>("UserId");
  453. b.HasKey("Id");
  454. b.HasIndex("AddressId");
  455. b.HasIndex("UserId");
  456. b.ToTable("Individuals");
  457. });
  458. modelBuilder.Entity("UnivateProperties_API.Model.Users.User", b =>
  459. {
  460. b.Property<int>("Id")
  461. .ValueGeneratedOnAdd();
  462. b.Property<DateTime>("Created");
  463. b.Property<DateTime>("Modified");
  464. b.Property<string>("ModifiedBy");
  465. b.Property<byte[]>("PasswordHash");
  466. b.Property<byte[]>("PasswordSalt");
  467. b.Property<string>("Role");
  468. b.Property<string>("Token");
  469. b.Property<string>("Username");
  470. b.Property<bool>("Verified");
  471. b.HasKey("Id");
  472. b.ToTable("Users");
  473. });
  474. modelBuilder.Entity("UnivateProperties_API.Model.Banks.BankAccount", b =>
  475. {
  476. b.HasOne("UnivateProperties_API.Model.Banks.Bank", "Bank")
  477. .WithMany()
  478. .HasForeignKey("BankId")
  479. .OnDelete(DeleteBehavior.Cascade);
  480. b.HasOne("UnivateProperties_API.Model.Users.Individual", "Owner")
  481. .WithMany()
  482. .HasForeignKey("OwnerId");
  483. });
  484. modelBuilder.Entity("UnivateProperties_API.Model.Communication.Email", b =>
  485. {
  486. b.HasOne("UnivateProperties_API.Model.Communication.SMTPAccount", "Sender")
  487. .WithMany("Emails")
  488. .HasForeignKey("SenderId")
  489. .OnDelete(DeleteBehavior.Cascade);
  490. });
  491. modelBuilder.Entity("UnivateProperties_API.Model.Communication.SMTPAccount", b =>
  492. {
  493. b.HasOne("UnivateProperties_API.Model.Communication.SMTPHost", "SMTPHost")
  494. .WithMany("SMTPAccounts")
  495. .HasForeignKey("SMTPHostId")
  496. .OnDelete(DeleteBehavior.Cascade);
  497. });
  498. modelBuilder.Entity("UnivateProperties_API.Model.ProcessFlow.BidItem", b =>
  499. {
  500. b.HasOne("UnivateProperties_API.Model.Users.Individual", "BidMaker")
  501. .WithMany()
  502. .HasForeignKey("BidMakerId");
  503. b.HasOne("UnivateProperties_API.Model.Properties.Property", "Property")
  504. .WithMany("BidItems")
  505. .HasForeignKey("PropertyId");
  506. b.HasOne("UnivateProperties_API.Model.Timeshare.Status", "Status")
  507. .WithMany()
  508. .HasForeignKey("StatusId");
  509. b.HasOne("UnivateProperties_API.Model.Timeshare.TimeshareWeek", "TimeshareWeek")
  510. .WithMany("BidItems")
  511. .HasForeignKey("TimeshareWeekId");
  512. });
  513. modelBuilder.Entity("UnivateProperties_API.Model.ProcessFlow.ProcessFlow", b =>
  514. {
  515. b.HasOne("UnivateProperties_API.Model.Properties.Property", "Property")
  516. .WithMany("ProcessFlows")
  517. .HasForeignKey("PropertyID");
  518. b.HasOne("UnivateProperties_API.Model.Timeshare.Status", "Status")
  519. .WithMany()
  520. .HasForeignKey("StatusID")
  521. .OnDelete(DeleteBehavior.Cascade);
  522. b.HasOne("UnivateProperties_API.Model.Timeshare.TimeshareWeek", "Timeshare")
  523. .WithMany("ProcessFlows")
  524. .HasForeignKey("TimeshareID");
  525. });
  526. modelBuilder.Entity("UnivateProperties_API.Model.Properties.Property", b =>
  527. {
  528. b.HasOne("UnivateProperties_API.Model.Users.Agency", "Agency")
  529. .WithMany("Properties")
  530. .HasForeignKey("AgencyId");
  531. b.HasOne("UnivateProperties_API.Model.Users.Agent", "Agent")
  532. .WithMany("Properties")
  533. .HasForeignKey("AgentId");
  534. b.HasOne("UnivateProperties_API.Model.Region.City", "City")
  535. .WithMany()
  536. .HasForeignKey("CityId")
  537. .OnDelete(DeleteBehavior.Cascade);
  538. b.HasOne("UnivateProperties_API.Model.Users.Individual", "Owner")
  539. .WithMany("Properties")
  540. .HasForeignKey("OwnerId");
  541. b.HasOne("UnivateProperties_API.Model.Properties.PropertyType", "PropertyType")
  542. .WithMany()
  543. .HasForeignKey("PropertyTypeId")
  544. .OnDelete(DeleteBehavior.Cascade);
  545. b.HasOne("UnivateProperties_API.Model.Region.Province", "Province")
  546. .WithMany()
  547. .HasForeignKey("ProvinceId")
  548. .OnDelete(DeleteBehavior.Cascade);
  549. b.HasOne("UnivateProperties_API.Model.Timeshare.Status", "Status")
  550. .WithMany()
  551. .HasForeignKey("StatusId");
  552. b.HasOne("UnivateProperties_API.Model.Region.Suburb", "Suburb")
  553. .WithMany()
  554. .HasForeignKey("SuburbId")
  555. .OnDelete(DeleteBehavior.Cascade);
  556. });
  557. modelBuilder.Entity("UnivateProperties_API.Model.Properties.PropertyImage", b =>
  558. {
  559. b.HasOne("UnivateProperties_API.Model.Properties.Property", "Property")
  560. .WithMany("PropertyImages")
  561. .HasForeignKey("PropertyId")
  562. .OnDelete(DeleteBehavior.Cascade);
  563. });
  564. modelBuilder.Entity("UnivateProperties_API.Model.Properties.PropertyUserField", b =>
  565. {
  566. b.HasOne("UnivateProperties_API.Model.Properties.Property", "Property")
  567. .WithMany("PropertyUserFields")
  568. .HasForeignKey("PropertyId")
  569. .OnDelete(DeleteBehavior.Cascade);
  570. b.HasOne("UnivateProperties_API.Model.Properties.UserDefinedField", "UserDefinedField")
  571. .WithMany()
  572. .HasForeignKey("UserDefinedFieldId")
  573. .OnDelete(DeleteBehavior.Cascade);
  574. });
  575. modelBuilder.Entity("UnivateProperties_API.Model.Properties.UserDefinedField", b =>
  576. {
  577. b.HasOne("UnivateProperties_API.Model.Properties.UserDefinedGroup", "Group")
  578. .WithMany("Fields")
  579. .HasForeignKey("GroupId")
  580. .OnDelete(DeleteBehavior.Cascade);
  581. });
  582. modelBuilder.Entity("UnivateProperties_API.Model.Region.City", b =>
  583. {
  584. b.HasOne("UnivateProperties_API.Model.Region.Province", "Province")
  585. .WithMany()
  586. .HasForeignKey("ProvinceId")
  587. .OnDelete(DeleteBehavior.Cascade);
  588. });
  589. modelBuilder.Entity("UnivateProperties_API.Model.Region.Suburb", b =>
  590. {
  591. b.HasOne("UnivateProperties_API.Model.Region.City", "City")
  592. .WithMany()
  593. .HasForeignKey("CityId")
  594. .OnDelete(DeleteBehavior.Cascade);
  595. });
  596. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.TimeshareWeek", b =>
  597. {
  598. b.HasOne("UnivateProperties_API.Model.Users.Agency", "Agency")
  599. .WithMany()
  600. .HasForeignKey("AgencyId");
  601. b.HasOne("UnivateProperties_API.Model.Users.Agent", "Agent")
  602. .WithMany()
  603. .HasForeignKey("AgentId");
  604. b.HasOne("UnivateProperties_API.Model.Users.Individual", "Owner")
  605. .WithMany()
  606. .HasForeignKey("OwnerId")
  607. .OnDelete(DeleteBehavior.Cascade);
  608. b.HasOne("UnivateProperties_API.Model.Region.Province", "Region")
  609. .WithMany()
  610. .HasForeignKey("RegionId")
  611. .OnDelete(DeleteBehavior.Cascade);
  612. b.HasOne("UnivateProperties_API.Model.Timeshare.Status", "Status")
  613. .WithMany()
  614. .HasForeignKey("StatusId")
  615. .OnDelete(DeleteBehavior.Cascade);
  616. });
  617. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.UnitConfigurationType", b =>
  618. {
  619. b.HasOne("UnivateProperties_API.Model.Timeshare.UnitConfiguration", "UnitConfiguration")
  620. .WithMany("Types")
  621. .HasForeignKey("UnitConfigurationId")
  622. .OnDelete(DeleteBehavior.Cascade);
  623. });
  624. modelBuilder.Entity("UnivateProperties_API.Model.Users.Agent", b =>
  625. {
  626. b.HasOne("UnivateProperties_API.Model.Users.Agency", "Agency")
  627. .WithMany("Agents")
  628. .HasForeignKey("AgencyId");
  629. b.HasOne("UnivateProperties_API.Model.Users.User", "User")
  630. .WithMany()
  631. .HasForeignKey("UserId");
  632. });
  633. modelBuilder.Entity("UnivateProperties_API.Model.Users.Individual", b =>
  634. {
  635. b.HasOne("UnivateProperties_API.Model.Misc.Address", "Address")
  636. .WithMany()
  637. .HasForeignKey("AddressId");
  638. b.HasOne("UnivateProperties_API.Model.Users.User", "User")
  639. .WithMany()
  640. .HasForeignKey("UserId");
  641. });
  642. #pragma warning restore 612, 618
  643. }
  644. }
  645. }