API
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

20190912055827_SearchLogStuff.Designer.cs 32KB

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