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.

20200121103350_PaymentsTable.Designer.cs 41KB

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