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

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