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.

DataContextModelSnapshot.cs 39KB

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