API
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

20190909074136_UnitNumber.Designer.cs 31KB

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