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.

20200121092345_MissingColumns.Designer.cs 39KB

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