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.

20191014135639_PlaceHolder.Designer.cs 37KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211
  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("20191014135639_PlaceHolder")]
  13. partial class PlaceHolder
  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<bool>("IsDeleted");
  28. b.Property<DateTime>("Modified");
  29. b.Property<string>("ModifiedBy");
  30. b.Property<string>("Name");
  31. b.Property<string>("UniversalBranchCode");
  32. b.HasKey("Id");
  33. b.ToTable("Banks");
  34. });
  35. modelBuilder.Entity("UnivateProperties_API.Model.Banks.BankAccount", b =>
  36. {
  37. b.Property<int>("Id")
  38. .ValueGeneratedOnAdd();
  39. b.Property<string>("AccountHolder");
  40. b.Property<string>("AccountNumber");
  41. b.Property<int>("BankId");
  42. b.Property<DateTime>("Created");
  43. b.Property<bool>("IsDeleted");
  44. b.Property<DateTime>("Modified");
  45. b.Property<string>("ModifiedBy");
  46. b.Property<int?>("OwnerId");
  47. b.HasKey("Id");
  48. b.HasIndex("BankId");
  49. b.HasIndex("OwnerId");
  50. b.ToTable("BankAccounts");
  51. });
  52. modelBuilder.Entity("UnivateProperties_API.Model.Communication.Email", b =>
  53. {
  54. b.Property<int>("Id")
  55. .ValueGeneratedOnAdd();
  56. b.Property<string>("BCC");
  57. b.Property<string>("Body");
  58. b.Property<string>("CC");
  59. b.Property<string>("Comment");
  60. b.Property<DateTime>("Created");
  61. b.Property<bool>("IsBodyHtml");
  62. b.Property<bool>("IsDeleted");
  63. b.Property<DateTime>("Modified");
  64. b.Property<string>("ModifiedBy");
  65. b.Property<int>("SenderId");
  66. b.Property<string>("Subject");
  67. b.Property<string>("To");
  68. b.Property<string>("ToDisplay");
  69. b.HasKey("Id");
  70. b.HasIndex("SenderId");
  71. b.ToTable("Emails");
  72. });
  73. modelBuilder.Entity("UnivateProperties_API.Model.Communication.PlaceHolder", b =>
  74. {
  75. b.Property<int>("Id")
  76. .ValueGeneratedOnAdd();
  77. b.Property<string>("BoundTo");
  78. b.Property<string>("BoundToClass");
  79. b.Property<string>("BoundToClassDisplay");
  80. b.Property<DateTime>("Created");
  81. b.Property<bool>("IsDeleted");
  82. b.Property<DateTime>("Modified");
  83. b.Property<string>("ModifiedBy");
  84. b.Property<string>("Name");
  85. b.Property<int>("TemplateId");
  86. b.HasKey("Id");
  87. b.HasIndex("TemplateId");
  88. b.ToTable("PlaceHolders");
  89. });
  90. modelBuilder.Entity("UnivateProperties_API.Model.Communication.SMTPAccount", b =>
  91. {
  92. b.Property<int>("Id")
  93. .ValueGeneratedOnAdd();
  94. b.Property<string>("Address");
  95. b.Property<DateTime>("Created");
  96. b.Property<string>("DisplayName");
  97. b.Property<bool>("IsDeleted");
  98. b.Property<DateTime>("Modified");
  99. b.Property<string>("ModifiedBy");
  100. b.Property<int>("SMTPHostId");
  101. b.HasKey("Id");
  102. b.HasIndex("SMTPHostId");
  103. b.ToTable("Accounts");
  104. });
  105. modelBuilder.Entity("UnivateProperties_API.Model.Communication.SMTPHost", b =>
  106. {
  107. b.Property<int>("Id")
  108. .ValueGeneratedOnAdd();
  109. b.Property<DateTime>("Created");
  110. b.Property<string>("Host");
  111. b.Property<bool>("IsDeleted");
  112. b.Property<DateTime>("Modified");
  113. b.Property<string>("ModifiedBy");
  114. b.Property<bool>("NeedsAuthorize");
  115. b.Property<string>("Password");
  116. b.Property<bool>("UseSSL");
  117. b.Property<string>("User");
  118. b.HasKey("Id");
  119. b.ToTable("Hosts");
  120. });
  121. modelBuilder.Entity("UnivateProperties_API.Model.Communication.Template", b =>
  122. {
  123. b.Property<int>("Id")
  124. .ValueGeneratedOnAdd();
  125. b.Property<string>("Body");
  126. b.Property<DateTime>("Created");
  127. b.Property<bool>("IsDeleted");
  128. b.Property<DateTime>("Modified");
  129. b.Property<string>("ModifiedBy");
  130. b.Property<string>("Name");
  131. b.Property<string>("Subject");
  132. b.HasKey("Id");
  133. b.ToTable("Templates");
  134. });
  135. modelBuilder.Entity("UnivateProperties_API.Model.Logging.SearchLog", b =>
  136. {
  137. b.Property<int>("Id")
  138. .ValueGeneratedOnAdd();
  139. b.Property<DateTime>("Created");
  140. b.Property<bool>("IsDeleted");
  141. b.Property<DateTime>("Modified");
  142. b.Property<string>("ModifiedBy");
  143. b.Property<string>("Search");
  144. b.Property<string>("Type");
  145. b.HasKey("Id");
  146. b.ToTable("SearchLogs");
  147. });
  148. modelBuilder.Entity("UnivateProperties_API.Model.Misc.Address", b =>
  149. {
  150. b.Property<int>("Id")
  151. .ValueGeneratedOnAdd();
  152. b.Property<string>("City");
  153. b.Property<DateTime>("Created");
  154. b.Property<bool>("IsDeleted");
  155. b.Property<DateTime>("Modified");
  156. b.Property<string>("ModifiedBy");
  157. b.Property<string>("PostalCode");
  158. b.Property<string>("Street");
  159. b.Property<string>("StreetNumber");
  160. b.Property<string>("Suburb");
  161. b.HasKey("Id");
  162. b.ToTable("Addresses");
  163. });
  164. modelBuilder.Entity("UnivateProperties_API.Model.Misc.Location", b =>
  165. {
  166. b.Property<int>("Id")
  167. .ValueGeneratedOnAdd();
  168. b.Property<DateTime>("Created");
  169. b.Property<bool>("IsDeleted");
  170. b.Property<bool>("IsTesting");
  171. b.Property<DateTime>("Modified");
  172. b.Property<string>("ModifiedBy");
  173. b.Property<string>("PropertyImageLocation");
  174. b.HasKey("Id");
  175. b.ToTable("Location");
  176. });
  177. modelBuilder.Entity("UnivateProperties_API.Model.ProcessFlow.BidItem", b =>
  178. {
  179. b.Property<int>("Id")
  180. .ValueGeneratedOnAdd();
  181. b.Property<double>("Amount");
  182. b.Property<int?>("BidMakerId");
  183. b.Property<string>("Comment");
  184. b.Property<DateTime>("Created");
  185. b.Property<string>("DeclinedReason");
  186. b.Property<bool>("IsDeleted");
  187. b.Property<DateTime>("Modified");
  188. b.Property<string>("ModifiedBy");
  189. b.Property<int?>("PropertyId");
  190. b.Property<int?>("StatusId");
  191. b.Property<int?>("TimeshareWeekId");
  192. b.HasKey("Id");
  193. b.HasIndex("BidMakerId");
  194. b.HasIndex("PropertyId");
  195. b.HasIndex("StatusId");
  196. b.HasIndex("TimeshareWeekId");
  197. b.ToTable("BidItems");
  198. });
  199. modelBuilder.Entity("UnivateProperties_API.Model.ProcessFlow.ProcessFlow", b =>
  200. {
  201. b.Property<int>("Id")
  202. .ValueGeneratedOnAdd();
  203. b.Property<DateTime>("Created");
  204. b.Property<bool>("IsDeleted");
  205. b.Property<DateTime>("Modified");
  206. b.Property<string>("ModifiedBy");
  207. b.Property<int?>("PropertyID");
  208. b.Property<int>("StatusID");
  209. b.Property<int?>("TimeshareID");
  210. b.HasKey("Id");
  211. b.HasIndex("PropertyID");
  212. b.HasIndex("StatusID");
  213. b.HasIndex("TimeshareID");
  214. b.ToTable("ProcessFlows");
  215. });
  216. modelBuilder.Entity("UnivateProperties_API.Model.Properties.Property", b =>
  217. {
  218. b.Property<int>("Id")
  219. .ValueGeneratedOnAdd();
  220. b.Property<string>("AddressLine1");
  221. b.Property<string>("AddressLine2");
  222. b.Property<string>("AddressLine3");
  223. b.Property<int?>("AgencyId");
  224. b.Property<int?>("AgentId");
  225. b.Property<int>("CityId");
  226. b.Property<DateTime>("Created");
  227. b.Property<string>("Description");
  228. b.Property<bool>("IsDeleted");
  229. b.Property<bool>("IsSale");
  230. b.Property<DateTime>("Modified");
  231. b.Property<string>("ModifiedBy");
  232. b.Property<decimal>("OperationalCosts");
  233. b.Property<int?>("OwnerId");
  234. b.Property<decimal>("Price");
  235. b.Property<string>("PricePer");
  236. b.Property<string>("PropertyName");
  237. b.Property<int>("PropertyTypeId");
  238. b.Property<int>("ProvinceId");
  239. b.Property<bool>("Published");
  240. b.Property<string>("ShortDescription");
  241. b.Property<int?>("StatusId");
  242. b.Property<int>("SuburbId");
  243. b.Property<string>("Unit");
  244. b.HasKey("Id");
  245. b.HasIndex("AgencyId");
  246. b.HasIndex("AgentId");
  247. b.HasIndex("CityId");
  248. b.HasIndex("OwnerId");
  249. b.HasIndex("PropertyTypeId");
  250. b.HasIndex("ProvinceId");
  251. b.HasIndex("StatusId");
  252. b.HasIndex("SuburbId");
  253. b.ToTable("Properties");
  254. });
  255. modelBuilder.Entity("UnivateProperties_API.Model.Properties.PropertyImage", b =>
  256. {
  257. b.Property<int>("Id")
  258. .ValueGeneratedOnAdd();
  259. b.Property<DateTime>("Created");
  260. b.Property<string>("Image");
  261. b.Property<bool>("IsDefault");
  262. b.Property<bool>("IsDeleted");
  263. b.Property<DateTime>("Modified");
  264. b.Property<string>("ModifiedBy");
  265. b.Property<int>("PropertyId");
  266. b.HasKey("Id");
  267. b.HasIndex("PropertyId");
  268. b.ToTable("PropertyImages");
  269. });
  270. modelBuilder.Entity("UnivateProperties_API.Model.Properties.PropertyType", b =>
  271. {
  272. b.Property<int>("Id")
  273. .ValueGeneratedOnAdd();
  274. b.Property<DateTime>("Created");
  275. b.Property<string>("Description");
  276. b.Property<bool>("IsDeleted");
  277. b.Property<DateTime>("Modified");
  278. b.Property<string>("ModifiedBy");
  279. b.Property<int>("UsageType");
  280. b.HasKey("Id");
  281. b.ToTable("PropertyTypes");
  282. });
  283. modelBuilder.Entity("UnivateProperties_API.Model.Properties.PropertyUserField", b =>
  284. {
  285. b.Property<int>("Id")
  286. .ValueGeneratedOnAdd();
  287. b.Property<DateTime>("Created");
  288. b.Property<string>("Description");
  289. b.Property<bool>("IsDeleted");
  290. b.Property<DateTime>("Modified");
  291. b.Property<string>("ModifiedBy");
  292. b.Property<int>("PropertyId");
  293. b.Property<int>("UserDefinedFieldId");
  294. b.Property<string>("Value");
  295. b.HasKey("Id");
  296. b.HasIndex("PropertyId");
  297. b.HasIndex("UserDefinedFieldId");
  298. b.ToTable("PropertyUserFields");
  299. });
  300. modelBuilder.Entity("UnivateProperties_API.Model.Properties.UserDefinedField", b =>
  301. {
  302. b.Property<int>("Id")
  303. .ValueGeneratedOnAdd();
  304. b.Property<DateTime>("Created");
  305. b.Property<string>("FieldName");
  306. b.Property<string>("FieldType");
  307. b.Property<int>("GroupId");
  308. b.Property<bool>("IsDeleted");
  309. b.Property<DateTime>("Modified");
  310. b.Property<string>("ModifiedBy");
  311. b.Property<int>("Rank");
  312. b.HasKey("Id");
  313. b.HasIndex("GroupId");
  314. b.ToTable("UserDefinedFields");
  315. });
  316. modelBuilder.Entity("UnivateProperties_API.Model.Properties.UserDefinedGroup", b =>
  317. {
  318. b.Property<int>("Id")
  319. .ValueGeneratedOnAdd();
  320. b.Property<DateTime>("Created");
  321. b.Property<string>("Description");
  322. b.Property<bool>("IsDeleted");
  323. b.Property<DateTime>("Modified");
  324. b.Property<string>("ModifiedBy");
  325. b.Property<int>("Rank");
  326. b.Property<int>("UsageType");
  327. b.HasKey("Id");
  328. b.ToTable("UserDefinedGroups");
  329. });
  330. modelBuilder.Entity("UnivateProperties_API.Model.Region.City", b =>
  331. {
  332. b.Property<int>("Id")
  333. .ValueGeneratedOnAdd();
  334. b.Property<string>("Code");
  335. b.Property<DateTime>("Created");
  336. b.Property<string>("Description");
  337. b.Property<bool>("IsDeleted");
  338. b.Property<DateTime>("Modified");
  339. b.Property<string>("ModifiedBy");
  340. b.Property<int>("ProvinceId");
  341. b.HasKey("Id");
  342. b.HasIndex("ProvinceId");
  343. b.ToTable("Cities");
  344. });
  345. modelBuilder.Entity("UnivateProperties_API.Model.Region.Province", b =>
  346. {
  347. b.Property<int>("Id")
  348. .ValueGeneratedOnAdd();
  349. b.Property<string>("Code");
  350. b.Property<DateTime>("Created");
  351. b.Property<string>("Description");
  352. b.Property<bool>("IsDeleted");
  353. b.Property<DateTime>("Modified");
  354. b.Property<string>("ModifiedBy");
  355. b.HasKey("Id");
  356. b.ToTable("Provinces");
  357. });
  358. modelBuilder.Entity("UnivateProperties_API.Model.Region.Suburb", b =>
  359. {
  360. b.Property<int>("Id")
  361. .ValueGeneratedOnAdd();
  362. b.Property<int>("CityId");
  363. b.Property<DateTime>("Created");
  364. b.Property<string>("Description");
  365. b.Property<bool>("IsDeleted");
  366. b.Property<DateTime>("Modified");
  367. b.Property<string>("ModifiedBy");
  368. b.Property<string>("PostalCode");
  369. b.HasKey("Id");
  370. b.HasIndex("CityId");
  371. b.ToTable("Suburbs");
  372. });
  373. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.Season", b =>
  374. {
  375. b.Property<int>("Id")
  376. .ValueGeneratedOnAdd();
  377. b.Property<DateTime>("Created");
  378. b.Property<bool>("IsDeleted");
  379. b.Property<DateTime>("Modified");
  380. b.Property<string>("ModifiedBy");
  381. b.Property<string>("Name");
  382. b.HasKey("Id");
  383. b.ToTable("Seasons");
  384. });
  385. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.Status", b =>
  386. {
  387. b.Property<int>("Id")
  388. .ValueGeneratedOnAdd();
  389. b.Property<string>("Code");
  390. b.Property<DateTime>("Created");
  391. b.Property<string>("Description");
  392. b.Property<bool>("IsDeleted");
  393. b.Property<DateTime>("Modified");
  394. b.Property<string>("ModifiedBy");
  395. b.Property<int>("StatusType");
  396. b.HasKey("Id");
  397. b.ToTable("Status");
  398. });
  399. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.TimeshareWeek", b =>
  400. {
  401. b.Property<int>("Id")
  402. .ValueGeneratedOnAdd();
  403. b.Property<int?>("AgencyId");
  404. b.Property<bool>("AgentAsRep");
  405. b.Property<int?>("AgentId");
  406. b.Property<DateTime>("ArrivalDate");
  407. b.Property<string>("BankedWith");
  408. b.Property<int>("Bedrooms");
  409. b.Property<DateTime>("Created");
  410. b.Property<bool>("CurrentYearBanked");
  411. b.Property<DateTime>("DepartureDate");
  412. b.Property<bool>("IsDeleted");
  413. b.Property<bool>("LeviesPaidInFull");
  414. b.Property<double>("LevyAmount");
  415. b.Property<int>("MaxSleep");
  416. b.Property<DateTime>("Modified");
  417. b.Property<string>("ModifiedBy");
  418. b.Property<string>("Module");
  419. b.Property<DateTime>("OriginalPurchaseDate");
  420. b.Property<double>("OriginalPurchasePrice");
  421. b.Property<bool>("OtherResort");
  422. b.Property<int>("OwnerId");
  423. b.Property<bool>("ReferedByAgent");
  424. b.Property<int>("RegionId");
  425. b.Property<string>("ResortCode");
  426. b.Property<string>("ResortName");
  427. b.Property<string>("Season");
  428. b.Property<double>("SellPrice");
  429. b.Property<int>("StatusId");
  430. b.Property<string>("UnitNumber");
  431. b.Property<string>("WeekNumber");
  432. b.Property<bool>("WeekPlacedForRental");
  433. b.HasKey("Id");
  434. b.HasIndex("AgencyId");
  435. b.HasIndex("AgentId");
  436. b.HasIndex("OwnerId");
  437. b.HasIndex("RegionId");
  438. b.HasIndex("StatusId");
  439. b.ToTable("Weeks");
  440. });
  441. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.UnitConfiguration", b =>
  442. {
  443. b.Property<int>("Id")
  444. .ValueGeneratedOnAdd();
  445. b.Property<int>("Adults");
  446. b.Property<int>("Bedrooms");
  447. b.Property<int>("Children");
  448. b.Property<string>("Code");
  449. b.Property<DateTime>("Created");
  450. b.Property<bool>("IsDeleted");
  451. b.Property<DateTime>("Modified");
  452. b.Property<string>("ModifiedBy");
  453. b.HasKey("Id");
  454. b.HasIndex("Code")
  455. .IsUnique();
  456. b.ToTable("UnitConfigurations");
  457. });
  458. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.UnitConfigurationType", b =>
  459. {
  460. b.Property<int>("Id")
  461. .ValueGeneratedOnAdd();
  462. b.Property<DateTime>("Created");
  463. b.Property<string>("Description");
  464. b.Property<bool>("IsDeleted");
  465. b.Property<DateTime>("Modified");
  466. b.Property<string>("ModifiedBy");
  467. b.Property<int>("UnitConfigurationId");
  468. b.HasKey("Id");
  469. b.HasIndex("UnitConfigurationId");
  470. b.ToTable("UnitConfigurationTypes");
  471. });
  472. modelBuilder.Entity("UnivateProperties_API.Model.Users.Agency", b =>
  473. {
  474. b.Property<int>("Id")
  475. .ValueGeneratedOnAdd();
  476. b.Property<string>("AgencyName");
  477. b.Property<string>("CompanyRegNumber");
  478. b.Property<DateTime>("Created");
  479. b.Property<string>("EAABEFFCNumber");
  480. b.Property<bool>("IsDeleted");
  481. b.Property<DateTime>("Modified");
  482. b.Property<string>("ModifiedBy");
  483. b.HasKey("Id");
  484. b.ToTable("Agencies");
  485. });
  486. modelBuilder.Entity("UnivateProperties_API.Model.Users.Agent", b =>
  487. {
  488. b.Property<int>("Id")
  489. .ValueGeneratedOnAdd();
  490. b.Property<int?>("AgencyId");
  491. b.Property<string>("CellNumber");
  492. b.Property<DateTime>("Created");
  493. b.Property<string>("Email");
  494. b.Property<bool>("IsDeleted");
  495. b.Property<DateTime>("Modified");
  496. b.Property<string>("ModifiedBy");
  497. b.Property<string>("Name");
  498. b.Property<string>("Surname");
  499. b.Property<string>("Telephone");
  500. b.Property<int?>("UserId");
  501. b.HasKey("Id");
  502. b.HasIndex("AgencyId");
  503. b.HasIndex("UserId");
  504. b.ToTable("Agents");
  505. });
  506. modelBuilder.Entity("UnivateProperties_API.Model.Users.Individual", b =>
  507. {
  508. b.Property<int>("Id")
  509. .ValueGeneratedOnAdd();
  510. b.Property<int?>("AddressId");
  511. b.Property<string>("CellNumber");
  512. b.Property<string>("CompanyRegNumber");
  513. b.Property<DateTime>("Created");
  514. b.Property<string>("Email");
  515. b.Property<string>("IdNumber");
  516. b.Property<string>("IncomeTaxNumber");
  517. b.Property<bool>("IsDeleted");
  518. b.Property<string>("MaritalStatus");
  519. b.Property<DateTime>("Modified");
  520. b.Property<string>("ModifiedBy");
  521. b.Property<string>("Name");
  522. b.Property<string>("Surname");
  523. b.Property<string>("Telephone");
  524. b.Property<int?>("UserId");
  525. b.HasKey("Id");
  526. b.HasIndex("AddressId");
  527. b.HasIndex("UserId");
  528. b.HasIndex("Telephone", "CellNumber", "Email")
  529. .IsUnique();
  530. b.ToTable("Individuals");
  531. });
  532. modelBuilder.Entity("UnivateProperties_API.Model.Users.Person", b =>
  533. {
  534. b.Property<int>("Id")
  535. .ValueGeneratedOnAdd();
  536. b.Property<string>("CellNumber");
  537. b.Property<DateTime>("Created");
  538. b.Property<string>("Email");
  539. b.Property<bool>("IsDeleted");
  540. b.Property<DateTime>("Modified");
  541. b.Property<string>("ModifiedBy");
  542. b.Property<string>("Name");
  543. b.Property<string>("Surname");
  544. b.Property<string>("Telephone");
  545. b.Property<int?>("UserId");
  546. b.HasKey("Id");
  547. b.HasIndex("UserId");
  548. b.ToTable("Person");
  549. });
  550. modelBuilder.Entity("UnivateProperties_API.Model.Users.User", b =>
  551. {
  552. b.Property<int>("Id")
  553. .ValueGeneratedOnAdd();
  554. b.Property<DateTime>("Created");
  555. b.Property<bool>("IsDeleted");
  556. b.Property<DateTime>("Modified");
  557. b.Property<string>("ModifiedBy");
  558. b.Property<byte[]>("PasswordHash");
  559. b.Property<byte[]>("PasswordSalt");
  560. b.Property<string>("Role");
  561. b.Property<string>("Token");
  562. b.Property<string>("Username");
  563. b.Property<bool>("Verified");
  564. b.HasKey("Id");
  565. b.HasIndex("Username")
  566. .IsUnique();
  567. b.ToTable("Users");
  568. });
  569. modelBuilder.Entity("UnivateProperties_API.Model.Banks.BankAccount", b =>
  570. {
  571. b.HasOne("UnivateProperties_API.Model.Banks.Bank", "Bank")
  572. .WithMany()
  573. .HasForeignKey("BankId")
  574. .OnDelete(DeleteBehavior.Cascade);
  575. b.HasOne("UnivateProperties_API.Model.Users.Individual", "Owner")
  576. .WithMany()
  577. .HasForeignKey("OwnerId");
  578. });
  579. modelBuilder.Entity("UnivateProperties_API.Model.Communication.Email", b =>
  580. {
  581. b.HasOne("UnivateProperties_API.Model.Communication.SMTPAccount", "Sender")
  582. .WithMany("Emails")
  583. .HasForeignKey("SenderId")
  584. .OnDelete(DeleteBehavior.Cascade);
  585. });
  586. modelBuilder.Entity("UnivateProperties_API.Model.Communication.PlaceHolder", b =>
  587. {
  588. b.HasOne("UnivateProperties_API.Model.Communication.Template", "Template")
  589. .WithMany("PlaceHolders")
  590. .HasForeignKey("TemplateId")
  591. .OnDelete(DeleteBehavior.Cascade);
  592. });
  593. modelBuilder.Entity("UnivateProperties_API.Model.Communication.SMTPAccount", b =>
  594. {
  595. b.HasOne("UnivateProperties_API.Model.Communication.SMTPHost", "SMTPHost")
  596. .WithMany("SMTPAccounts")
  597. .HasForeignKey("SMTPHostId")
  598. .OnDelete(DeleteBehavior.Cascade);
  599. });
  600. modelBuilder.Entity("UnivateProperties_API.Model.ProcessFlow.BidItem", b =>
  601. {
  602. b.HasOne("UnivateProperties_API.Model.Users.Individual", "BidMaker")
  603. .WithMany()
  604. .HasForeignKey("BidMakerId");
  605. b.HasOne("UnivateProperties_API.Model.Properties.Property", "Property")
  606. .WithMany("BidItems")
  607. .HasForeignKey("PropertyId");
  608. b.HasOne("UnivateProperties_API.Model.Timeshare.Status", "Status")
  609. .WithMany()
  610. .HasForeignKey("StatusId");
  611. b.HasOne("UnivateProperties_API.Model.Timeshare.TimeshareWeek", "TimeshareWeek")
  612. .WithMany("BidItems")
  613. .HasForeignKey("TimeshareWeekId");
  614. });
  615. modelBuilder.Entity("UnivateProperties_API.Model.ProcessFlow.ProcessFlow", b =>
  616. {
  617. b.HasOne("UnivateProperties_API.Model.Properties.Property", "Property")
  618. .WithMany("ProcessFlows")
  619. .HasForeignKey("PropertyID");
  620. b.HasOne("UnivateProperties_API.Model.Timeshare.Status", "Status")
  621. .WithMany()
  622. .HasForeignKey("StatusID")
  623. .OnDelete(DeleteBehavior.Cascade);
  624. b.HasOne("UnivateProperties_API.Model.Timeshare.TimeshareWeek", "Timeshare")
  625. .WithMany("ProcessFlows")
  626. .HasForeignKey("TimeshareID");
  627. });
  628. modelBuilder.Entity("UnivateProperties_API.Model.Properties.Property", b =>
  629. {
  630. b.HasOne("UnivateProperties_API.Model.Users.Agency", "Agency")
  631. .WithMany("Properties")
  632. .HasForeignKey("AgencyId");
  633. b.HasOne("UnivateProperties_API.Model.Users.Agent", "Agent")
  634. .WithMany("Properties")
  635. .HasForeignKey("AgentId");
  636. b.HasOne("UnivateProperties_API.Model.Region.City", "City")
  637. .WithMany()
  638. .HasForeignKey("CityId")
  639. .OnDelete(DeleteBehavior.Cascade);
  640. b.HasOne("UnivateProperties_API.Model.Users.Individual", "Owner")
  641. .WithMany("Properties")
  642. .HasForeignKey("OwnerId");
  643. b.HasOne("UnivateProperties_API.Model.Properties.PropertyType", "PropertyType")
  644. .WithMany()
  645. .HasForeignKey("PropertyTypeId")
  646. .OnDelete(DeleteBehavior.Cascade);
  647. b.HasOne("UnivateProperties_API.Model.Region.Province", "Province")
  648. .WithMany()
  649. .HasForeignKey("ProvinceId")
  650. .OnDelete(DeleteBehavior.Cascade);
  651. b.HasOne("UnivateProperties_API.Model.Timeshare.Status", "Status")
  652. .WithMany()
  653. .HasForeignKey("StatusId");
  654. b.HasOne("UnivateProperties_API.Model.Region.Suburb", "Suburb")
  655. .WithMany()
  656. .HasForeignKey("SuburbId")
  657. .OnDelete(DeleteBehavior.Cascade);
  658. });
  659. modelBuilder.Entity("UnivateProperties_API.Model.Properties.PropertyImage", b =>
  660. {
  661. b.HasOne("UnivateProperties_API.Model.Properties.Property", "Property")
  662. .WithMany("PropertyImages")
  663. .HasForeignKey("PropertyId")
  664. .OnDelete(DeleteBehavior.Cascade);
  665. });
  666. modelBuilder.Entity("UnivateProperties_API.Model.Properties.PropertyUserField", b =>
  667. {
  668. b.HasOne("UnivateProperties_API.Model.Properties.Property", "Property")
  669. .WithMany("PropertyUserFields")
  670. .HasForeignKey("PropertyId")
  671. .OnDelete(DeleteBehavior.Cascade);
  672. b.HasOne("UnivateProperties_API.Model.Properties.UserDefinedField", "UserDefinedField")
  673. .WithMany()
  674. .HasForeignKey("UserDefinedFieldId")
  675. .OnDelete(DeleteBehavior.Cascade);
  676. });
  677. modelBuilder.Entity("UnivateProperties_API.Model.Properties.UserDefinedField", b =>
  678. {
  679. b.HasOne("UnivateProperties_API.Model.Properties.UserDefinedGroup", "Group")
  680. .WithMany("Fields")
  681. .HasForeignKey("GroupId")
  682. .OnDelete(DeleteBehavior.Cascade);
  683. });
  684. modelBuilder.Entity("UnivateProperties_API.Model.Region.City", b =>
  685. {
  686. b.HasOne("UnivateProperties_API.Model.Region.Province", "Province")
  687. .WithMany()
  688. .HasForeignKey("ProvinceId")
  689. .OnDelete(DeleteBehavior.Cascade);
  690. });
  691. modelBuilder.Entity("UnivateProperties_API.Model.Region.Suburb", b =>
  692. {
  693. b.HasOne("UnivateProperties_API.Model.Region.City", "City")
  694. .WithMany()
  695. .HasForeignKey("CityId")
  696. .OnDelete(DeleteBehavior.Cascade);
  697. });
  698. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.TimeshareWeek", b =>
  699. {
  700. b.HasOne("UnivateProperties_API.Model.Users.Agency", "Agency")
  701. .WithMany()
  702. .HasForeignKey("AgencyId");
  703. b.HasOne("UnivateProperties_API.Model.Users.Agent", "Agent")
  704. .WithMany()
  705. .HasForeignKey("AgentId");
  706. b.HasOne("UnivateProperties_API.Model.Users.Individual", "Owner")
  707. .WithMany()
  708. .HasForeignKey("OwnerId")
  709. .OnDelete(DeleteBehavior.Cascade);
  710. b.HasOne("UnivateProperties_API.Model.Region.Province", "Region")
  711. .WithMany()
  712. .HasForeignKey("RegionId")
  713. .OnDelete(DeleteBehavior.Cascade);
  714. b.HasOne("UnivateProperties_API.Model.Timeshare.Status", "Status")
  715. .WithMany()
  716. .HasForeignKey("StatusId")
  717. .OnDelete(DeleteBehavior.Cascade);
  718. });
  719. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.UnitConfigurationType", b =>
  720. {
  721. b.HasOne("UnivateProperties_API.Model.Timeshare.UnitConfiguration", "UnitConfiguration")
  722. .WithMany("Types")
  723. .HasForeignKey("UnitConfigurationId")
  724. .OnDelete(DeleteBehavior.Cascade);
  725. });
  726. modelBuilder.Entity("UnivateProperties_API.Model.Users.Agent", b =>
  727. {
  728. b.HasOne("UnivateProperties_API.Model.Users.Agency", "Agency")
  729. .WithMany("Agents")
  730. .HasForeignKey("AgencyId");
  731. b.HasOne("UnivateProperties_API.Model.Users.User", "User")
  732. .WithMany()
  733. .HasForeignKey("UserId");
  734. });
  735. modelBuilder.Entity("UnivateProperties_API.Model.Users.Individual", b =>
  736. {
  737. b.HasOne("UnivateProperties_API.Model.Misc.Address", "Address")
  738. .WithMany()
  739. .HasForeignKey("AddressId");
  740. b.HasOne("UnivateProperties_API.Model.Users.User", "User")
  741. .WithMany()
  742. .HasForeignKey("UserId");
  743. });
  744. modelBuilder.Entity("UnivateProperties_API.Model.Users.Person", b =>
  745. {
  746. b.HasOne("UnivateProperties_API.Model.Users.User", "User")
  747. .WithMany()
  748. .HasForeignKey("UserId");
  749. });
  750. #pragma warning restore 612, 618
  751. }
  752. }
  753. }