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.

20191112124547_templateMod.Designer.cs 39KB

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