API

20190910092816_GeorgeNew.Designer.cs 32KB

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