API
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

20190905133540_BanksAddresses.Designer.cs 29KB

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