API
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

DataContextModelSnapshot.cs 32KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028
  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.4-servicing-10062")
  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<int?>("UserID");
  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<int?>("GCRecord");
  174. b.Property<bool>("IsSale");
  175. b.Property<DateTime>("Modified");
  176. b.Property<string>("ModifiedBy");
  177. b.Property<decimal>("OperationalCosts");
  178. b.Property<int?>("OwnerId");
  179. b.Property<decimal>("Price");
  180. b.Property<string>("PricePer");
  181. b.Property<string>("PropertyName");
  182. b.Property<int>("PropertyTypeId");
  183. b.Property<int>("ProvinceId");
  184. b.Property<bool>("Published");
  185. b.Property<string>("ShortDescription");
  186. b.Property<int?>("StatusId");
  187. b.Property<int>("SuburbId");
  188. b.Property<string>("Unit");
  189. b.HasKey("Id");
  190. b.HasIndex("AgencyId");
  191. b.HasIndex("AgentId");
  192. b.HasIndex("CityId");
  193. b.HasIndex("OwnerId");
  194. b.HasIndex("PropertyTypeId");
  195. b.HasIndex("ProvinceId");
  196. b.HasIndex("StatusId");
  197. b.HasIndex("SuburbId");
  198. b.ToTable("Properties");
  199. });
  200. modelBuilder.Entity("UnivateProperties_API.Model.Properties.PropertyImage", b =>
  201. {
  202. b.Property<int>("Id")
  203. .ValueGeneratedOnAdd();
  204. b.Property<DateTime>("Created");
  205. b.Property<string>("Image");
  206. b.Property<bool>("IsDefault");
  207. b.Property<DateTime>("Modified");
  208. b.Property<string>("ModifiedBy");
  209. b.Property<int>("PropertyId");
  210. b.HasKey("Id");
  211. b.HasIndex("PropertyId");
  212. b.ToTable("PropertyImages");
  213. });
  214. modelBuilder.Entity("UnivateProperties_API.Model.Properties.PropertyType", b =>
  215. {
  216. b.Property<int>("Id")
  217. .ValueGeneratedOnAdd();
  218. b.Property<DateTime>("Created");
  219. b.Property<string>("Description");
  220. b.Property<DateTime>("Modified");
  221. b.Property<string>("ModifiedBy");
  222. b.Property<int>("UsageType");
  223. b.HasKey("Id");
  224. b.ToTable("PropertyTypes");
  225. });
  226. modelBuilder.Entity("UnivateProperties_API.Model.Properties.PropertyUserField", b =>
  227. {
  228. b.Property<int>("Id")
  229. .ValueGeneratedOnAdd();
  230. b.Property<DateTime>("Created");
  231. b.Property<string>("Description");
  232. b.Property<DateTime>("Modified");
  233. b.Property<string>("ModifiedBy");
  234. b.Property<int>("PropertyId");
  235. b.Property<int>("UserDefinedFieldId");
  236. b.Property<string>("Value");
  237. b.HasKey("Id");
  238. b.HasIndex("PropertyId");
  239. b.HasIndex("UserDefinedFieldId");
  240. b.ToTable("PropertyUserFields");
  241. });
  242. modelBuilder.Entity("UnivateProperties_API.Model.Properties.UserDefinedField", b =>
  243. {
  244. b.Property<int>("Id")
  245. .ValueGeneratedOnAdd();
  246. b.Property<DateTime>("Created");
  247. b.Property<string>("FieldName");
  248. b.Property<string>("FieldType");
  249. b.Property<int>("GroupId");
  250. b.Property<DateTime>("Modified");
  251. b.Property<string>("ModifiedBy");
  252. b.Property<int>("Rank");
  253. b.HasKey("Id");
  254. b.HasIndex("GroupId");
  255. b.ToTable("UserDefinedFields");
  256. });
  257. modelBuilder.Entity("UnivateProperties_API.Model.Properties.UserDefinedGroup", b =>
  258. {
  259. b.Property<int>("Id")
  260. .ValueGeneratedOnAdd();
  261. b.Property<DateTime>("Created");
  262. b.Property<string>("Description");
  263. b.Property<DateTime>("Modified");
  264. b.Property<string>("ModifiedBy");
  265. b.Property<int>("Rank");
  266. b.Property<int>("UsageType");
  267. b.HasKey("Id");
  268. b.ToTable("UserDefinedGroups");
  269. });
  270. modelBuilder.Entity("UnivateProperties_API.Model.Region.City", b =>
  271. {
  272. b.Property<int>("Id")
  273. .ValueGeneratedOnAdd();
  274. b.Property<string>("Code");
  275. b.Property<DateTime>("Created");
  276. b.Property<string>("Description");
  277. b.Property<DateTime>("Modified");
  278. b.Property<string>("ModifiedBy");
  279. b.Property<int>("ProvinceId");
  280. b.HasKey("Id");
  281. b.HasIndex("ProvinceId");
  282. b.ToTable("Cities");
  283. });
  284. modelBuilder.Entity("UnivateProperties_API.Model.Region.Province", b =>
  285. {
  286. b.Property<int>("Id")
  287. .ValueGeneratedOnAdd();
  288. b.Property<string>("Code");
  289. b.Property<DateTime>("Created");
  290. b.Property<string>("Description");
  291. b.Property<DateTime>("Modified");
  292. b.Property<string>("ModifiedBy");
  293. b.HasKey("Id");
  294. b.ToTable("Provinces");
  295. });
  296. modelBuilder.Entity("UnivateProperties_API.Model.Region.Suburb", b =>
  297. {
  298. b.Property<int>("Id")
  299. .ValueGeneratedOnAdd();
  300. b.Property<int>("CityId");
  301. b.Property<DateTime>("Created");
  302. b.Property<string>("Description");
  303. b.Property<DateTime>("Modified");
  304. b.Property<string>("ModifiedBy");
  305. b.Property<string>("PostalCode");
  306. b.HasKey("Id");
  307. b.HasIndex("CityId");
  308. b.ToTable("Suburbs");
  309. });
  310. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.Season", b =>
  311. {
  312. b.Property<int>("Id")
  313. .ValueGeneratedOnAdd();
  314. b.Property<DateTime>("Created");
  315. b.Property<DateTime>("Modified");
  316. b.Property<string>("ModifiedBy");
  317. b.Property<string>("Name");
  318. b.HasKey("Id");
  319. b.ToTable("Seasons");
  320. });
  321. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.Status", b =>
  322. {
  323. b.Property<int>("Id")
  324. .ValueGeneratedOnAdd();
  325. b.Property<string>("Code");
  326. b.Property<DateTime>("Created");
  327. b.Property<string>("Description");
  328. b.Property<DateTime>("Modified");
  329. b.Property<string>("ModifiedBy");
  330. b.Property<int>("StatusType");
  331. b.HasKey("Id");
  332. b.ToTable("Status");
  333. });
  334. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.TimeshareWeek", b =>
  335. {
  336. b.Property<int>("Id")
  337. .ValueGeneratedOnAdd();
  338. b.Property<int?>("AgencyId");
  339. b.Property<bool>("AgentAsRep");
  340. b.Property<int?>("AgentId");
  341. b.Property<DateTime>("ArrivalDate");
  342. b.Property<string>("BankedWith");
  343. b.Property<int>("Bedrooms");
  344. b.Property<DateTime>("Created");
  345. b.Property<bool>("CurrentYearBanked");
  346. b.Property<DateTime>("DepartureDate");
  347. b.Property<bool>("LeviesPaidInFull");
  348. b.Property<double>("LevyAmount");
  349. b.Property<int>("MaxSleep");
  350. b.Property<DateTime>("Modified");
  351. b.Property<string>("ModifiedBy");
  352. b.Property<string>("Module");
  353. b.Property<DateTime>("OriginalPurchaseDate");
  354. b.Property<double>("OriginalPurchasePrice");
  355. b.Property<bool>("OtherResort");
  356. b.Property<int>("OwnerId");
  357. b.Property<bool>("ReferedByAgent");
  358. b.Property<int>("RegionId");
  359. b.Property<string>("ResortCode");
  360. b.Property<string>("ResortName");
  361. b.Property<string>("Season");
  362. b.Property<double>("SellPrice");
  363. b.Property<int>("StatusId");
  364. b.Property<string>("UnitNumber");
  365. b.Property<string>("WeekNumber");
  366. b.Property<bool>("WeekPlacedForRental");
  367. b.HasKey("Id");
  368. b.HasIndex("AgencyId");
  369. b.HasIndex("AgentId");
  370. b.HasIndex("OwnerId");
  371. b.HasIndex("RegionId");
  372. b.HasIndex("StatusId");
  373. b.ToTable("Weeks");
  374. });
  375. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.UnitConfiguration", b =>
  376. {
  377. b.Property<int>("Id")
  378. .ValueGeneratedOnAdd();
  379. b.Property<int>("Adults");
  380. b.Property<int>("Bedrooms");
  381. b.Property<int>("Children");
  382. b.Property<string>("Code");
  383. b.Property<DateTime>("Created");
  384. b.Property<DateTime>("Modified");
  385. b.Property<string>("ModifiedBy");
  386. b.HasKey("Id");
  387. b.HasIndex("Code")
  388. .IsUnique();
  389. b.ToTable("UnitConfigurations");
  390. });
  391. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.UnitConfigurationType", b =>
  392. {
  393. b.Property<int>("Id")
  394. .ValueGeneratedOnAdd();
  395. b.Property<DateTime>("Created");
  396. b.Property<string>("Description");
  397. b.Property<DateTime>("Modified");
  398. b.Property<string>("ModifiedBy");
  399. b.Property<int>("UnitConfigurationId");
  400. b.HasKey("Id");
  401. b.HasIndex("UnitConfigurationId");
  402. b.ToTable("UnitConfigurationTypes");
  403. });
  404. modelBuilder.Entity("UnivateProperties_API.Model.Users.Agency", b =>
  405. {
  406. b.Property<int>("Id")
  407. .ValueGeneratedOnAdd();
  408. b.Property<string>("AgencyName");
  409. b.Property<string>("CompanyRegNumber");
  410. b.Property<DateTime>("Created");
  411. b.Property<string>("EAABEFFCNumber");
  412. b.Property<DateTime>("Modified");
  413. b.Property<string>("ModifiedBy");
  414. b.HasKey("Id");
  415. b.ToTable("Agencies");
  416. });
  417. modelBuilder.Entity("UnivateProperties_API.Model.Users.Agent", b =>
  418. {
  419. b.Property<int>("Id")
  420. .ValueGeneratedOnAdd();
  421. b.Property<int?>("AgencyId");
  422. b.Property<string>("CellNumber");
  423. b.Property<DateTime>("Created");
  424. b.Property<string>("Email");
  425. b.Property<DateTime>("Modified");
  426. b.Property<string>("ModifiedBy");
  427. b.Property<string>("Name");
  428. b.Property<string>("Surname");
  429. b.Property<string>("Telephone");
  430. b.Property<int?>("UserId");
  431. b.HasKey("Id");
  432. b.HasIndex("AgencyId");
  433. b.HasIndex("UserId");
  434. b.ToTable("Agents");
  435. });
  436. modelBuilder.Entity("UnivateProperties_API.Model.Users.Individual", b =>
  437. {
  438. b.Property<int>("Id")
  439. .ValueGeneratedOnAdd();
  440. b.Property<int?>("AddressId");
  441. b.Property<string>("CellNumber");
  442. b.Property<string>("CompanyRegNumber");
  443. b.Property<DateTime>("Created");
  444. b.Property<string>("Email");
  445. b.Property<string>("IdNumber");
  446. b.Property<string>("IncomeTaxNumber");
  447. b.Property<string>("MaritalStatus");
  448. b.Property<DateTime>("Modified");
  449. b.Property<string>("ModifiedBy");
  450. b.Property<string>("Name");
  451. b.Property<string>("Surname");
  452. b.Property<string>("Telephone");
  453. b.Property<int?>("UserId");
  454. b.HasKey("Id");
  455. b.HasIndex("AddressId");
  456. b.HasIndex("UserId");
  457. b.ToTable("Individuals");
  458. });
  459. modelBuilder.Entity("UnivateProperties_API.Model.Users.User", b =>
  460. {
  461. b.Property<int>("Id")
  462. .ValueGeneratedOnAdd();
  463. b.Property<DateTime>("Created");
  464. b.Property<DateTime>("Modified");
  465. b.Property<string>("ModifiedBy");
  466. b.Property<byte[]>("PasswordHash");
  467. b.Property<byte[]>("PasswordSalt");
  468. b.Property<string>("Role");
  469. b.Property<string>("Token");
  470. b.Property<string>("Username");
  471. b.Property<bool>("Verified");
  472. b.HasKey("Id");
  473. b.ToTable("Users");
  474. });
  475. modelBuilder.Entity("UnivateProperties_API.Model.Banks.BankAccount", b =>
  476. {
  477. b.HasOne("UnivateProperties_API.Model.Banks.Bank", "Bank")
  478. .WithMany()
  479. .HasForeignKey("BankId")
  480. .OnDelete(DeleteBehavior.Cascade);
  481. b.HasOne("UnivateProperties_API.Model.Users.Individual", "Owner")
  482. .WithMany()
  483. .HasForeignKey("OwnerId");
  484. });
  485. modelBuilder.Entity("UnivateProperties_API.Model.Communication.Email", b =>
  486. {
  487. b.HasOne("UnivateProperties_API.Model.Communication.SMTPAccount", "Sender")
  488. .WithMany("Emails")
  489. .HasForeignKey("SenderId")
  490. .OnDelete(DeleteBehavior.Cascade);
  491. });
  492. modelBuilder.Entity("UnivateProperties_API.Model.Communication.SMTPAccount", b =>
  493. {
  494. b.HasOne("UnivateProperties_API.Model.Communication.SMTPHost", "SMTPHost")
  495. .WithMany("SMTPAccounts")
  496. .HasForeignKey("SMTPHostId")
  497. .OnDelete(DeleteBehavior.Cascade);
  498. });
  499. modelBuilder.Entity("UnivateProperties_API.Model.ProcessFlow.BidItem", b =>
  500. {
  501. b.HasOne("UnivateProperties_API.Model.Users.Individual", "BidMaker")
  502. .WithMany()
  503. .HasForeignKey("BidMakerId");
  504. b.HasOne("UnivateProperties_API.Model.Properties.Property", "Property")
  505. .WithMany("BidItems")
  506. .HasForeignKey("PropertyId");
  507. b.HasOne("UnivateProperties_API.Model.Timeshare.Status", "Status")
  508. .WithMany()
  509. .HasForeignKey("StatusId");
  510. b.HasOne("UnivateProperties_API.Model.Timeshare.TimeshareWeek", "TimeshareWeek")
  511. .WithMany("BidItems")
  512. .HasForeignKey("TimeshareWeekId");
  513. });
  514. modelBuilder.Entity("UnivateProperties_API.Model.ProcessFlow.ProcessFlow", b =>
  515. {
  516. b.HasOne("UnivateProperties_API.Model.Properties.Property", "Property")
  517. .WithMany("ProcessFlows")
  518. .HasForeignKey("PropertyID");
  519. b.HasOne("UnivateProperties_API.Model.Timeshare.Status", "Status")
  520. .WithMany()
  521. .HasForeignKey("StatusID")
  522. .OnDelete(DeleteBehavior.Cascade);
  523. b.HasOne("UnivateProperties_API.Model.Timeshare.TimeshareWeek", "Timeshare")
  524. .WithMany("ProcessFlows")
  525. .HasForeignKey("TimeshareID");
  526. });
  527. modelBuilder.Entity("UnivateProperties_API.Model.Properties.Property", b =>
  528. {
  529. b.HasOne("UnivateProperties_API.Model.Users.Agency", "Agency")
  530. .WithMany("Properties")
  531. .HasForeignKey("AgencyId");
  532. b.HasOne("UnivateProperties_API.Model.Users.Agent", "Agent")
  533. .WithMany("Properties")
  534. .HasForeignKey("AgentId");
  535. b.HasOne("UnivateProperties_API.Model.Region.City", "City")
  536. .WithMany()
  537. .HasForeignKey("CityId")
  538. .OnDelete(DeleteBehavior.Cascade);
  539. b.HasOne("UnivateProperties_API.Model.Users.Individual", "Owner")
  540. .WithMany("Properties")
  541. .HasForeignKey("OwnerId");
  542. b.HasOne("UnivateProperties_API.Model.Properties.PropertyType", "PropertyType")
  543. .WithMany()
  544. .HasForeignKey("PropertyTypeId")
  545. .OnDelete(DeleteBehavior.Cascade);
  546. b.HasOne("UnivateProperties_API.Model.Region.Province", "Province")
  547. .WithMany()
  548. .HasForeignKey("ProvinceId")
  549. .OnDelete(DeleteBehavior.Cascade);
  550. b.HasOne("UnivateProperties_API.Model.Timeshare.Status", "Status")
  551. .WithMany()
  552. .HasForeignKey("StatusId");
  553. b.HasOne("UnivateProperties_API.Model.Region.Suburb", "Suburb")
  554. .WithMany()
  555. .HasForeignKey("SuburbId")
  556. .OnDelete(DeleteBehavior.Cascade);
  557. });
  558. modelBuilder.Entity("UnivateProperties_API.Model.Properties.PropertyImage", b =>
  559. {
  560. b.HasOne("UnivateProperties_API.Model.Properties.Property", "Property")
  561. .WithMany("PropertyImages")
  562. .HasForeignKey("PropertyId")
  563. .OnDelete(DeleteBehavior.Cascade);
  564. });
  565. modelBuilder.Entity("UnivateProperties_API.Model.Properties.PropertyUserField", b =>
  566. {
  567. b.HasOne("UnivateProperties_API.Model.Properties.Property", "Property")
  568. .WithMany("PropertyUserFields")
  569. .HasForeignKey("PropertyId")
  570. .OnDelete(DeleteBehavior.Cascade);
  571. b.HasOne("UnivateProperties_API.Model.Properties.UserDefinedField", "UserDefinedField")
  572. .WithMany()
  573. .HasForeignKey("UserDefinedFieldId")
  574. .OnDelete(DeleteBehavior.Cascade);
  575. });
  576. modelBuilder.Entity("UnivateProperties_API.Model.Properties.UserDefinedField", b =>
  577. {
  578. b.HasOne("UnivateProperties_API.Model.Properties.UserDefinedGroup", "Group")
  579. .WithMany("Fields")
  580. .HasForeignKey("GroupId")
  581. .OnDelete(DeleteBehavior.Cascade);
  582. });
  583. modelBuilder.Entity("UnivateProperties_API.Model.Region.City", b =>
  584. {
  585. b.HasOne("UnivateProperties_API.Model.Region.Province", "Province")
  586. .WithMany()
  587. .HasForeignKey("ProvinceId")
  588. .OnDelete(DeleteBehavior.Cascade);
  589. });
  590. modelBuilder.Entity("UnivateProperties_API.Model.Region.Suburb", b =>
  591. {
  592. b.HasOne("UnivateProperties_API.Model.Region.City", "City")
  593. .WithMany()
  594. .HasForeignKey("CityId")
  595. .OnDelete(DeleteBehavior.Cascade);
  596. });
  597. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.TimeshareWeek", b =>
  598. {
  599. b.HasOne("UnivateProperties_API.Model.Users.Agency", "Agency")
  600. .WithMany()
  601. .HasForeignKey("AgencyId");
  602. b.HasOne("UnivateProperties_API.Model.Users.Agent", "Agent")
  603. .WithMany()
  604. .HasForeignKey("AgentId");
  605. b.HasOne("UnivateProperties_API.Model.Users.Individual", "Owner")
  606. .WithMany()
  607. .HasForeignKey("OwnerId")
  608. .OnDelete(DeleteBehavior.Cascade);
  609. b.HasOne("UnivateProperties_API.Model.Region.Province", "Region")
  610. .WithMany()
  611. .HasForeignKey("RegionId")
  612. .OnDelete(DeleteBehavior.Cascade);
  613. b.HasOne("UnivateProperties_API.Model.Timeshare.Status", "Status")
  614. .WithMany()
  615. .HasForeignKey("StatusId")
  616. .OnDelete(DeleteBehavior.Cascade);
  617. });
  618. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.UnitConfigurationType", b =>
  619. {
  620. b.HasOne("UnivateProperties_API.Model.Timeshare.UnitConfiguration", "UnitConfiguration")
  621. .WithMany("Types")
  622. .HasForeignKey("UnitConfigurationId")
  623. .OnDelete(DeleteBehavior.Cascade);
  624. });
  625. modelBuilder.Entity("UnivateProperties_API.Model.Users.Agent", b =>
  626. {
  627. b.HasOne("UnivateProperties_API.Model.Users.Agency", "Agency")
  628. .WithMany("Agents")
  629. .HasForeignKey("AgencyId");
  630. b.HasOne("UnivateProperties_API.Model.Users.User", "User")
  631. .WithMany()
  632. .HasForeignKey("UserId");
  633. });
  634. modelBuilder.Entity("UnivateProperties_API.Model.Users.Individual", b =>
  635. {
  636. b.HasOne("UnivateProperties_API.Model.Misc.Address", "Address")
  637. .WithMany()
  638. .HasForeignKey("AddressId");
  639. b.HasOne("UnivateProperties_API.Model.Users.User", "User")
  640. .WithMany()
  641. .HasForeignKey("UserId");
  642. });
  643. #pragma warning restore 612, 618
  644. }
  645. }
  646. }