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 37KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213
  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<string>("DisplayName");
  95. b.Property<bool>("IsDeleted");
  96. b.Property<DateTime>("Modified");
  97. b.Property<string>("ModifiedBy");
  98. b.Property<int>("SMTPHostId");
  99. b.HasKey("Id");
  100. b.HasIndex("SMTPHostId");
  101. b.ToTable("Accounts");
  102. });
  103. modelBuilder.Entity("UnivateProperties_API.Model.Communication.SMTPHost", b =>
  104. {
  105. b.Property<int>("Id")
  106. .ValueGeneratedOnAdd();
  107. b.Property<DateTime>("Created");
  108. b.Property<string>("Host");
  109. b.Property<bool>("IsDeleted");
  110. b.Property<DateTime>("Modified");
  111. b.Property<string>("ModifiedBy");
  112. b.Property<bool>("NeedsAuthorize");
  113. b.Property<string>("Password");
  114. b.Property<bool>("UseSSL");
  115. b.Property<string>("User");
  116. b.HasKey("Id");
  117. b.ToTable("Hosts");
  118. });
  119. modelBuilder.Entity("UnivateProperties_API.Model.Communication.Template", b =>
  120. {
  121. b.Property<int>("Id")
  122. .ValueGeneratedOnAdd();
  123. b.Property<string>("Body");
  124. b.Property<DateTime>("Created");
  125. b.Property<bool>("IsDeleted");
  126. b.Property<DateTime>("Modified");
  127. b.Property<string>("ModifiedBy");
  128. b.Property<string>("Name");
  129. b.Property<string>("Subject");
  130. b.HasKey("Id");
  131. b.ToTable("Templates");
  132. });
  133. modelBuilder.Entity("UnivateProperties_API.Model.Logging.SearchLog", b =>
  134. {
  135. b.Property<int>("Id")
  136. .ValueGeneratedOnAdd();
  137. b.Property<DateTime>("Created");
  138. b.Property<bool>("IsDeleted");
  139. b.Property<DateTime>("Modified");
  140. b.Property<string>("ModifiedBy");
  141. b.Property<string>("Search");
  142. b.Property<string>("Type");
  143. b.HasKey("Id");
  144. b.ToTable("SearchLogs");
  145. });
  146. modelBuilder.Entity("UnivateProperties_API.Model.Misc.Address", b =>
  147. {
  148. b.Property<int>("Id")
  149. .ValueGeneratedOnAdd();
  150. b.Property<string>("City");
  151. b.Property<DateTime>("Created");
  152. b.Property<bool>("IsDeleted");
  153. b.Property<DateTime>("Modified");
  154. b.Property<string>("ModifiedBy");
  155. b.Property<string>("PostalCode");
  156. b.Property<string>("Street");
  157. b.Property<string>("StreetNumber");
  158. b.Property<string>("Suburb");
  159. b.HasKey("Id");
  160. b.ToTable("Addresses");
  161. });
  162. modelBuilder.Entity("UnivateProperties_API.Model.Misc.Location", b =>
  163. {
  164. b.Property<int>("Id")
  165. .ValueGeneratedOnAdd();
  166. b.Property<DateTime>("Created");
  167. b.Property<bool>("IsDeleted");
  168. b.Property<bool>("IsTesting");
  169. b.Property<DateTime>("Modified");
  170. b.Property<string>("ModifiedBy");
  171. b.Property<string>("PropertyImageLocation");
  172. b.HasKey("Id");
  173. b.ToTable("Location");
  174. });
  175. modelBuilder.Entity("UnivateProperties_API.Model.ProcessFlow.BidItem", b =>
  176. {
  177. b.Property<int>("Id")
  178. .ValueGeneratedOnAdd();
  179. b.Property<double>("Amount");
  180. b.Property<int?>("BidMakerId");
  181. b.Property<string>("Comment");
  182. b.Property<DateTime>("Created");
  183. b.Property<string>("DeclinedReason");
  184. b.Property<bool>("IsDeleted");
  185. b.Property<DateTime>("Modified");
  186. b.Property<string>("ModifiedBy");
  187. b.Property<int?>("PropertyId");
  188. b.Property<int?>("StatusId");
  189. b.Property<int?>("TimeshareWeekId");
  190. b.HasKey("Id");
  191. b.HasIndex("BidMakerId");
  192. b.HasIndex("PropertyId");
  193. b.HasIndex("StatusId");
  194. b.HasIndex("TimeshareWeekId");
  195. b.ToTable("BidItems");
  196. });
  197. modelBuilder.Entity("UnivateProperties_API.Model.ProcessFlow.ProcessFlow", b =>
  198. {
  199. b.Property<int>("Id")
  200. .ValueGeneratedOnAdd();
  201. b.Property<DateTime>("Created");
  202. b.Property<bool>("IsDeleted");
  203. b.Property<DateTime>("Modified");
  204. b.Property<string>("ModifiedBy");
  205. b.Property<int?>("PropertyID");
  206. b.Property<int>("StatusID");
  207. b.Property<int?>("TimeshareID");
  208. b.HasKey("Id");
  209. b.HasIndex("PropertyID");
  210. b.HasIndex("StatusID");
  211. b.HasIndex("TimeshareID");
  212. b.ToTable("ProcessFlows");
  213. });
  214. modelBuilder.Entity("UnivateProperties_API.Model.Properties.Property", b =>
  215. {
  216. b.Property<int>("Id")
  217. .ValueGeneratedOnAdd();
  218. b.Property<string>("AddressLine1");
  219. b.Property<string>("AddressLine2");
  220. b.Property<string>("AddressLine3");
  221. b.Property<int?>("AgencyId");
  222. b.Property<int?>("AgentId");
  223. b.Property<int>("CityId");
  224. b.Property<DateTime>("Created");
  225. b.Property<string>("Description");
  226. b.Property<bool>("IsDeleted");
  227. b.Property<bool>("IsSale");
  228. b.Property<DateTime>("Modified");
  229. b.Property<string>("ModifiedBy");
  230. b.Property<decimal>("OperationalCosts");
  231. b.Property<int?>("OwnerId");
  232. b.Property<decimal>("Price");
  233. b.Property<string>("PricePer");
  234. b.Property<string>("PropertyName");
  235. b.Property<int>("PropertyTypeId");
  236. b.Property<int>("ProvinceId");
  237. b.Property<bool>("Published");
  238. b.Property<string>("ShortDescription");
  239. b.Property<int?>("StatusId");
  240. b.Property<int>("SuburbId");
  241. b.Property<string>("Unit");
  242. b.Property<string>("Video");
  243. b.Property<string>("VirtualTour");
  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. }