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.

20190906105051_Process.Designer.cs 31KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008
  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("20190906105051_Process")]
  13. partial class Process
  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.Bank.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.Bank.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>("WeekNumber");
  355. b.Property<bool>("WeekPlacedForRental");
  356. b.HasKey("Id");
  357. b.HasIndex("AgencyId");
  358. b.HasIndex("AgentId");
  359. b.HasIndex("OwnerId");
  360. b.HasIndex("RegionId");
  361. b.HasIndex("StatusId");
  362. b.ToTable("Weeks");
  363. });
  364. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.UnitConfiguration", b =>
  365. {
  366. b.Property<int>("Id")
  367. .ValueGeneratedOnAdd();
  368. b.Property<int>("Adults");
  369. b.Property<int>("Bedrooms");
  370. b.Property<int>("Children");
  371. b.Property<string>("Code");
  372. b.Property<DateTime>("Created");
  373. b.Property<DateTime>("Modified");
  374. b.Property<string>("ModifiedBy");
  375. b.HasKey("Id");
  376. b.HasIndex("Code")
  377. .IsUnique();
  378. b.ToTable("UnitConfigurations");
  379. });
  380. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.UnitConfigurationType", b =>
  381. {
  382. b.Property<int>("Id")
  383. .ValueGeneratedOnAdd();
  384. b.Property<DateTime>("Created");
  385. b.Property<string>("Description");
  386. b.Property<DateTime>("Modified");
  387. b.Property<string>("ModifiedBy");
  388. b.Property<int>("UnitConfigurationId");
  389. b.HasKey("Id");
  390. b.HasIndex("UnitConfigurationId");
  391. b.ToTable("UnitConfigurationTypes");
  392. });
  393. modelBuilder.Entity("UnivateProperties_API.Model.Users.Agency", b =>
  394. {
  395. b.Property<int>("Id")
  396. .ValueGeneratedOnAdd();
  397. b.Property<string>("AgencyName");
  398. b.Property<string>("CompanyRegNumber");
  399. b.Property<DateTime>("Created");
  400. b.Property<string>("EAABEFFCNumber");
  401. b.Property<DateTime>("Modified");
  402. b.Property<string>("ModifiedBy");
  403. b.HasKey("Id");
  404. b.ToTable("Agencies");
  405. });
  406. modelBuilder.Entity("UnivateProperties_API.Model.Users.Agent", b =>
  407. {
  408. b.Property<int>("Id")
  409. .ValueGeneratedOnAdd();
  410. b.Property<int?>("AgencyId");
  411. b.Property<string>("CellNumber");
  412. b.Property<DateTime>("Created");
  413. b.Property<string>("Email");
  414. b.Property<DateTime>("Modified");
  415. b.Property<string>("ModifiedBy");
  416. b.Property<string>("Name");
  417. b.Property<string>("Surname");
  418. b.Property<string>("Telephone");
  419. b.Property<int?>("UserId");
  420. b.HasKey("Id");
  421. b.HasIndex("AgencyId");
  422. b.HasIndex("UserId");
  423. b.ToTable("Agents");
  424. });
  425. modelBuilder.Entity("UnivateProperties_API.Model.Users.Individual", b =>
  426. {
  427. b.Property<int>("Id")
  428. .ValueGeneratedOnAdd();
  429. b.Property<int?>("AddressId");
  430. b.Property<string>("CellNumber");
  431. b.Property<string>("CompanyRegNumber");
  432. b.Property<DateTime>("Created");
  433. b.Property<string>("Email");
  434. b.Property<string>("IdNumber");
  435. b.Property<string>("IncomeTaxNumber");
  436. b.Property<string>("MaritalStatus");
  437. b.Property<DateTime>("Modified");
  438. b.Property<string>("ModifiedBy");
  439. b.Property<string>("Name");
  440. b.Property<string>("Surname");
  441. b.Property<string>("Telephone");
  442. b.Property<int?>("UserId");
  443. b.HasKey("Id");
  444. b.HasIndex("AddressId");
  445. b.HasIndex("UserId");
  446. b.ToTable("Individuals");
  447. });
  448. modelBuilder.Entity("UnivateProperties_API.Model.Users.User", b =>
  449. {
  450. b.Property<int>("Id")
  451. .ValueGeneratedOnAdd();
  452. b.Property<DateTime>("Created");
  453. b.Property<DateTime>("Modified");
  454. b.Property<string>("ModifiedBy");
  455. b.Property<byte[]>("PasswordHash");
  456. b.Property<byte[]>("PasswordSalt");
  457. b.Property<string>("Role");
  458. b.Property<string>("Token");
  459. b.Property<string>("Username");
  460. b.Property<bool>("Verified");
  461. b.HasKey("Id");
  462. b.ToTable("Users");
  463. });
  464. modelBuilder.Entity("UnivateProperties_API.Model.Bank.BankAccount", b =>
  465. {
  466. b.HasOne("UnivateProperties_API.Model.Bank.Bank", "Bank")
  467. .WithMany()
  468. .HasForeignKey("BankId")
  469. .OnDelete(DeleteBehavior.Cascade);
  470. b.HasOne("UnivateProperties_API.Model.Users.Individual", "Owner")
  471. .WithMany()
  472. .HasForeignKey("OwnerId");
  473. });
  474. modelBuilder.Entity("UnivateProperties_API.Model.Communication.Email", b =>
  475. {
  476. b.HasOne("UnivateProperties_API.Model.Communication.SMTPAccount", "Sender")
  477. .WithMany("Emails")
  478. .HasForeignKey("SenderId")
  479. .OnDelete(DeleteBehavior.Cascade);
  480. });
  481. modelBuilder.Entity("UnivateProperties_API.Model.Communication.SMTPAccount", b =>
  482. {
  483. b.HasOne("UnivateProperties_API.Model.Communication.SMTPHost", "SMTPHost")
  484. .WithMany("SMTPAccounts")
  485. .HasForeignKey("SMTPHostId")
  486. .OnDelete(DeleteBehavior.Cascade);
  487. });
  488. modelBuilder.Entity("UnivateProperties_API.Model.ProcessFlow.BidItem", b =>
  489. {
  490. b.HasOne("UnivateProperties_API.Model.Users.Individual", "BidMaker")
  491. .WithMany()
  492. .HasForeignKey("BidMakerId");
  493. b.HasOne("UnivateProperties_API.Model.Properties.Property", "Property")
  494. .WithMany("BidItems")
  495. .HasForeignKey("PropertyId");
  496. b.HasOne("UnivateProperties_API.Model.Timeshare.Status", "Status")
  497. .WithMany()
  498. .HasForeignKey("StatusId");
  499. b.HasOne("UnivateProperties_API.Model.Timeshare.TimeshareWeek", "TimeshareWeek")
  500. .WithMany("BidItems")
  501. .HasForeignKey("TimeshareWeekId");
  502. });
  503. modelBuilder.Entity("UnivateProperties_API.Model.ProcessFlow.ProcessFlow", b =>
  504. {
  505. b.HasOne("UnivateProperties_API.Model.Properties.Property", "Property")
  506. .WithMany("ProcessFlows")
  507. .HasForeignKey("PropertyID");
  508. b.HasOne("UnivateProperties_API.Model.Timeshare.Status", "Status")
  509. .WithMany()
  510. .HasForeignKey("StatusID")
  511. .OnDelete(DeleteBehavior.Cascade);
  512. b.HasOne("UnivateProperties_API.Model.Timeshare.TimeshareWeek", "Timeshare")
  513. .WithMany("ProcessFlows")
  514. .HasForeignKey("TimeshareID");
  515. });
  516. modelBuilder.Entity("UnivateProperties_API.Model.Properties.Property", b =>
  517. {
  518. b.HasOne("UnivateProperties_API.Model.Users.Agency", "Agency")
  519. .WithMany("Properties")
  520. .HasForeignKey("AgencyId");
  521. b.HasOne("UnivateProperties_API.Model.Users.Agent", "Agent")
  522. .WithMany("Properties")
  523. .HasForeignKey("AgentId");
  524. b.HasOne("UnivateProperties_API.Model.Region.City", "City")
  525. .WithMany()
  526. .HasForeignKey("CityId")
  527. .OnDelete(DeleteBehavior.Cascade);
  528. b.HasOne("UnivateProperties_API.Model.Users.Individual", "Owner")
  529. .WithMany("Properties")
  530. .HasForeignKey("OwnerId");
  531. b.HasOne("UnivateProperties_API.Model.Properties.PropertyType", "PropertyType")
  532. .WithMany()
  533. .HasForeignKey("PropertyTypeId")
  534. .OnDelete(DeleteBehavior.Cascade);
  535. b.HasOne("UnivateProperties_API.Model.Region.Province", "Province")
  536. .WithMany()
  537. .HasForeignKey("ProvinceId")
  538. .OnDelete(DeleteBehavior.Cascade);
  539. b.HasOne("UnivateProperties_API.Model.Timeshare.Status", "Status")
  540. .WithMany()
  541. .HasForeignKey("StatusId");
  542. b.HasOne("UnivateProperties_API.Model.Region.Suburb", "Suburb")
  543. .WithMany()
  544. .HasForeignKey("SuburbId")
  545. .OnDelete(DeleteBehavior.Cascade);
  546. });
  547. modelBuilder.Entity("UnivateProperties_API.Model.Properties.PropertyImage", b =>
  548. {
  549. b.HasOne("UnivateProperties_API.Model.Properties.Property", "Property")
  550. .WithMany("PropertyImages")
  551. .HasForeignKey("PropertyId")
  552. .OnDelete(DeleteBehavior.Cascade);
  553. });
  554. modelBuilder.Entity("UnivateProperties_API.Model.Properties.PropertyUserField", b =>
  555. {
  556. b.HasOne("UnivateProperties_API.Model.Properties.Property", "Property")
  557. .WithMany("PropertyUserFields")
  558. .HasForeignKey("PropertyId")
  559. .OnDelete(DeleteBehavior.Cascade);
  560. b.HasOne("UnivateProperties_API.Model.Properties.UserDefinedField", "UserDefinedField")
  561. .WithMany()
  562. .HasForeignKey("UserDefinedFieldId")
  563. .OnDelete(DeleteBehavior.Cascade);
  564. });
  565. modelBuilder.Entity("UnivateProperties_API.Model.Properties.UserDefinedField", b =>
  566. {
  567. b.HasOne("UnivateProperties_API.Model.Properties.UserDefinedGroup", "Group")
  568. .WithMany("Fields")
  569. .HasForeignKey("GroupId")
  570. .OnDelete(DeleteBehavior.Cascade);
  571. });
  572. modelBuilder.Entity("UnivateProperties_API.Model.Region.City", b =>
  573. {
  574. b.HasOne("UnivateProperties_API.Model.Region.Province", "Province")
  575. .WithMany()
  576. .HasForeignKey("ProvinceId")
  577. .OnDelete(DeleteBehavior.Cascade);
  578. });
  579. modelBuilder.Entity("UnivateProperties_API.Model.Region.Suburb", b =>
  580. {
  581. b.HasOne("UnivateProperties_API.Model.Region.City", "City")
  582. .WithMany()
  583. .HasForeignKey("CityId")
  584. .OnDelete(DeleteBehavior.Cascade);
  585. });
  586. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.TimeshareWeek", b =>
  587. {
  588. b.HasOne("UnivateProperties_API.Model.Users.Agency", "Agency")
  589. .WithMany()
  590. .HasForeignKey("AgencyId");
  591. b.HasOne("UnivateProperties_API.Model.Users.Agent", "Agent")
  592. .WithMany()
  593. .HasForeignKey("AgentId");
  594. b.HasOne("UnivateProperties_API.Model.Users.Individual", "Owner")
  595. .WithMany()
  596. .HasForeignKey("OwnerId")
  597. .OnDelete(DeleteBehavior.Cascade);
  598. b.HasOne("UnivateProperties_API.Model.Region.Province", "Region")
  599. .WithMany()
  600. .HasForeignKey("RegionId")
  601. .OnDelete(DeleteBehavior.Cascade);
  602. b.HasOne("UnivateProperties_API.Model.Timeshare.Status", "Status")
  603. .WithMany()
  604. .HasForeignKey("StatusId")
  605. .OnDelete(DeleteBehavior.Cascade);
  606. });
  607. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.UnitConfigurationType", b =>
  608. {
  609. b.HasOne("UnivateProperties_API.Model.Timeshare.UnitConfiguration", "UnitConfiguration")
  610. .WithMany("Types")
  611. .HasForeignKey("UnitConfigurationId")
  612. .OnDelete(DeleteBehavior.Cascade);
  613. });
  614. modelBuilder.Entity("UnivateProperties_API.Model.Users.Agent", b =>
  615. {
  616. b.HasOne("UnivateProperties_API.Model.Users.Agency", "Agency")
  617. .WithMany("Agents")
  618. .HasForeignKey("AgencyId");
  619. b.HasOne("UnivateProperties_API.Model.Users.User", "User")
  620. .WithMany()
  621. .HasForeignKey("UserId");
  622. });
  623. modelBuilder.Entity("UnivateProperties_API.Model.Users.Individual", b =>
  624. {
  625. b.HasOne("UnivateProperties_API.Model.Misc.Address", "Address")
  626. .WithMany()
  627. .HasForeignKey("AddressId");
  628. b.HasOne("UnivateProperties_API.Model.Users.User", "User")
  629. .WithMany()
  630. .HasForeignKey("UserId");
  631. });
  632. #pragma warning restore 612, 618
  633. }
  634. }
  635. }