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.

20191018124608_NewPropertyProperties.Designer.cs 37KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215
  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("20191018124608_NewPropertyProperties")]
  13. partial class NewPropertyProperties
  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<string>("DisplayName");
  97. b.Property<bool>("IsDeleted");
  98. b.Property<DateTime>("Modified");
  99. b.Property<string>("ModifiedBy");
  100. b.Property<int>("SMTPHostId");
  101. b.HasKey("Id");
  102. b.HasIndex("SMTPHostId");
  103. b.ToTable("Accounts");
  104. });
  105. modelBuilder.Entity("UnivateProperties_API.Model.Communication.SMTPHost", b =>
  106. {
  107. b.Property<int>("Id")
  108. .ValueGeneratedOnAdd();
  109. b.Property<DateTime>("Created");
  110. b.Property<string>("Host");
  111. b.Property<bool>("IsDeleted");
  112. b.Property<DateTime>("Modified");
  113. b.Property<string>("ModifiedBy");
  114. b.Property<bool>("NeedsAuthorize");
  115. b.Property<string>("Password");
  116. b.Property<bool>("UseSSL");
  117. b.Property<string>("User");
  118. b.HasKey("Id");
  119. b.ToTable("Hosts");
  120. });
  121. modelBuilder.Entity("UnivateProperties_API.Model.Communication.Template", b =>
  122. {
  123. b.Property<int>("Id")
  124. .ValueGeneratedOnAdd();
  125. b.Property<string>("Body");
  126. b.Property<DateTime>("Created");
  127. b.Property<bool>("IsDeleted");
  128. b.Property<DateTime>("Modified");
  129. b.Property<string>("ModifiedBy");
  130. b.Property<string>("Name");
  131. b.Property<string>("Subject");
  132. b.HasKey("Id");
  133. b.ToTable("Templates");
  134. });
  135. modelBuilder.Entity("UnivateProperties_API.Model.Logging.SearchLog", b =>
  136. {
  137. b.Property<int>("Id")
  138. .ValueGeneratedOnAdd();
  139. b.Property<DateTime>("Created");
  140. b.Property<bool>("IsDeleted");
  141. b.Property<DateTime>("Modified");
  142. b.Property<string>("ModifiedBy");
  143. b.Property<string>("Search");
  144. b.Property<string>("Type");
  145. b.HasKey("Id");
  146. b.ToTable("SearchLogs");
  147. });
  148. modelBuilder.Entity("UnivateProperties_API.Model.Misc.Address", b =>
  149. {
  150. b.Property<int>("Id")
  151. .ValueGeneratedOnAdd();
  152. b.Property<string>("City");
  153. b.Property<DateTime>("Created");
  154. b.Property<bool>("IsDeleted");
  155. b.Property<DateTime>("Modified");
  156. b.Property<string>("ModifiedBy");
  157. b.Property<string>("PostalCode");
  158. b.Property<string>("Street");
  159. b.Property<string>("StreetNumber");
  160. b.Property<string>("Suburb");
  161. b.HasKey("Id");
  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<int?>("AgentId");
  408. b.Property<DateTime>("ArrivalDate");
  409. b.Property<string>("BankedWith");
  410. b.Property<int>("Bedrooms");
  411. b.Property<DateTime>("Created");
  412. b.Property<bool>("CurrentYearBanked");
  413. b.Property<DateTime>("DepartureDate");
  414. b.Property<bool>("IsDeleted");
  415. b.Property<bool>("LeviesPaidInFull");
  416. b.Property<double>("LevyAmount");
  417. b.Property<int>("MaxSleep");
  418. b.Property<DateTime>("Modified");
  419. b.Property<string>("ModifiedBy");
  420. b.Property<string>("Module");
  421. b.Property<DateTime>("OriginalPurchaseDate");
  422. b.Property<double>("OriginalPurchasePrice");
  423. b.Property<bool>("OtherResort");
  424. b.Property<int>("OwnerId");
  425. b.Property<bool>("ReferedByAgent");
  426. b.Property<int>("RegionId");
  427. b.Property<string>("ResortCode");
  428. b.Property<string>("ResortName");
  429. b.Property<string>("Season");
  430. b.Property<double>("SellPrice");
  431. b.Property<int>("StatusId");
  432. b.Property<string>("UnitNumber");
  433. b.Property<string>("WeekNumber");
  434. b.Property<bool>("WeekPlacedForRental");
  435. b.HasKey("Id");
  436. b.HasIndex("AgencyId");
  437. b.HasIndex("AgentId");
  438. b.HasIndex("OwnerId");
  439. b.HasIndex("RegionId");
  440. b.HasIndex("StatusId");
  441. b.ToTable("Weeks");
  442. });
  443. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.UnitConfiguration", b =>
  444. {
  445. b.Property<int>("Id")
  446. .ValueGeneratedOnAdd();
  447. b.Property<int>("Adults");
  448. b.Property<int>("Bedrooms");
  449. b.Property<int>("Children");
  450. b.Property<string>("Code");
  451. b.Property<DateTime>("Created");
  452. b.Property<bool>("IsDeleted");
  453. b.Property<DateTime>("Modified");
  454. b.Property<string>("ModifiedBy");
  455. b.HasKey("Id");
  456. b.HasIndex("Code")
  457. .IsUnique();
  458. b.ToTable("UnitConfigurations");
  459. });
  460. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.UnitConfigurationType", b =>
  461. {
  462. b.Property<int>("Id")
  463. .ValueGeneratedOnAdd();
  464. b.Property<DateTime>("Created");
  465. b.Property<string>("Description");
  466. b.Property<bool>("IsDeleted");
  467. b.Property<DateTime>("Modified");
  468. b.Property<string>("ModifiedBy");
  469. b.Property<int>("UnitConfigurationId");
  470. b.HasKey("Id");
  471. b.HasIndex("UnitConfigurationId");
  472. b.ToTable("UnitConfigurationTypes");
  473. });
  474. modelBuilder.Entity("UnivateProperties_API.Model.Users.Agency", b =>
  475. {
  476. b.Property<int>("Id")
  477. .ValueGeneratedOnAdd();
  478. b.Property<string>("AgencyName");
  479. b.Property<string>("CompanyRegNumber");
  480. b.Property<DateTime>("Created");
  481. b.Property<string>("EAABEFFCNumber");
  482. b.Property<bool>("IsDeleted");
  483. b.Property<DateTime>("Modified");
  484. b.Property<string>("ModifiedBy");
  485. b.HasKey("Id");
  486. b.ToTable("Agencies");
  487. });
  488. modelBuilder.Entity("UnivateProperties_API.Model.Users.Agent", b =>
  489. {
  490. b.Property<int>("Id")
  491. .ValueGeneratedOnAdd();
  492. b.Property<int?>("AgencyId");
  493. b.Property<string>("CellNumber");
  494. b.Property<DateTime>("Created");
  495. b.Property<string>("Email");
  496. b.Property<bool>("IsDeleted");
  497. b.Property<DateTime>("Modified");
  498. b.Property<string>("ModifiedBy");
  499. b.Property<string>("Name");
  500. b.Property<string>("Surname");
  501. b.Property<string>("Telephone");
  502. b.Property<int?>("UserId");
  503. b.HasKey("Id");
  504. b.HasIndex("AgencyId");
  505. b.HasIndex("UserId");
  506. b.ToTable("Agents");
  507. });
  508. modelBuilder.Entity("UnivateProperties_API.Model.Users.Individual", b =>
  509. {
  510. b.Property<int>("Id")
  511. .ValueGeneratedOnAdd();
  512. b.Property<int?>("AddressId");
  513. b.Property<string>("CellNumber");
  514. b.Property<string>("CompanyRegNumber");
  515. b.Property<DateTime>("Created");
  516. b.Property<string>("Email");
  517. b.Property<string>("IdNumber");
  518. b.Property<string>("IncomeTaxNumber");
  519. b.Property<bool>("IsDeleted");
  520. b.Property<string>("MaritalStatus");
  521. b.Property<DateTime>("Modified");
  522. b.Property<string>("ModifiedBy");
  523. b.Property<string>("Name");
  524. b.Property<string>("Surname");
  525. b.Property<string>("Telephone");
  526. b.Property<int?>("UserId");
  527. b.HasKey("Id");
  528. b.HasIndex("AddressId");
  529. b.HasIndex("UserId");
  530. b.HasIndex("Telephone", "CellNumber", "Email")
  531. .IsUnique();
  532. b.ToTable("Individuals");
  533. });
  534. modelBuilder.Entity("UnivateProperties_API.Model.Users.Person", b =>
  535. {
  536. b.Property<int>("Id")
  537. .ValueGeneratedOnAdd();
  538. b.Property<string>("CellNumber");
  539. b.Property<DateTime>("Created");
  540. b.Property<string>("Email");
  541. b.Property<bool>("IsDeleted");
  542. b.Property<DateTime>("Modified");
  543. b.Property<string>("ModifiedBy");
  544. b.Property<string>("Name");
  545. b.Property<string>("Surname");
  546. b.Property<string>("Telephone");
  547. b.Property<int?>("UserId");
  548. b.HasKey("Id");
  549. b.HasIndex("UserId");
  550. b.ToTable("Person");
  551. });
  552. modelBuilder.Entity("UnivateProperties_API.Model.Users.User", b =>
  553. {
  554. b.Property<int>("Id")
  555. .ValueGeneratedOnAdd();
  556. b.Property<DateTime>("Created");
  557. b.Property<bool>("IsDeleted");
  558. b.Property<DateTime>("Modified");
  559. b.Property<string>("ModifiedBy");
  560. b.Property<byte[]>("PasswordHash");
  561. b.Property<byte[]>("PasswordSalt");
  562. b.Property<string>("Role");
  563. b.Property<string>("Token");
  564. b.Property<string>("Username");
  565. b.Property<bool>("Verified");
  566. b.HasKey("Id");
  567. b.HasIndex("Username")
  568. .IsUnique();
  569. b.ToTable("Users");
  570. });
  571. modelBuilder.Entity("UnivateProperties_API.Model.Banks.BankAccount", b =>
  572. {
  573. b.HasOne("UnivateProperties_API.Model.Banks.Bank", "Bank")
  574. .WithMany()
  575. .HasForeignKey("BankId")
  576. .OnDelete(DeleteBehavior.Cascade);
  577. b.HasOne("UnivateProperties_API.Model.Users.Individual", "Owner")
  578. .WithMany()
  579. .HasForeignKey("OwnerId");
  580. });
  581. modelBuilder.Entity("UnivateProperties_API.Model.Communication.Email", b =>
  582. {
  583. b.HasOne("UnivateProperties_API.Model.Communication.SMTPAccount", "Sender")
  584. .WithMany("Emails")
  585. .HasForeignKey("SenderId")
  586. .OnDelete(DeleteBehavior.Cascade);
  587. });
  588. modelBuilder.Entity("UnivateProperties_API.Model.Communication.PlaceHolder", b =>
  589. {
  590. b.HasOne("UnivateProperties_API.Model.Communication.Template", "Template")
  591. .WithMany("PlaceHolders")
  592. .HasForeignKey("TemplateId")
  593. .OnDelete(DeleteBehavior.Cascade);
  594. });
  595. modelBuilder.Entity("UnivateProperties_API.Model.Communication.SMTPAccount", b =>
  596. {
  597. b.HasOne("UnivateProperties_API.Model.Communication.SMTPHost", "SMTPHost")
  598. .WithMany("SMTPAccounts")
  599. .HasForeignKey("SMTPHostId")
  600. .OnDelete(DeleteBehavior.Cascade);
  601. });
  602. modelBuilder.Entity("UnivateProperties_API.Model.ProcessFlow.BidItem", b =>
  603. {
  604. b.HasOne("UnivateProperties_API.Model.Users.Individual", "BidMaker")
  605. .WithMany()
  606. .HasForeignKey("BidMakerId");
  607. b.HasOne("UnivateProperties_API.Model.Properties.Property", "Property")
  608. .WithMany("BidItems")
  609. .HasForeignKey("PropertyId");
  610. b.HasOne("UnivateProperties_API.Model.Timeshare.Status", "Status")
  611. .WithMany()
  612. .HasForeignKey("StatusId");
  613. b.HasOne("UnivateProperties_API.Model.Timeshare.TimeshareWeek", "TimeshareWeek")
  614. .WithMany("BidItems")
  615. .HasForeignKey("TimeshareWeekId");
  616. });
  617. modelBuilder.Entity("UnivateProperties_API.Model.ProcessFlow.ProcessFlow", b =>
  618. {
  619. b.HasOne("UnivateProperties_API.Model.Properties.Property", "Property")
  620. .WithMany("ProcessFlows")
  621. .HasForeignKey("PropertyID");
  622. b.HasOne("UnivateProperties_API.Model.Timeshare.Status", "Status")
  623. .WithMany()
  624. .HasForeignKey("StatusID")
  625. .OnDelete(DeleteBehavior.Cascade);
  626. b.HasOne("UnivateProperties_API.Model.Timeshare.TimeshareWeek", "Timeshare")
  627. .WithMany("ProcessFlows")
  628. .HasForeignKey("TimeshareID");
  629. });
  630. modelBuilder.Entity("UnivateProperties_API.Model.Properties.Property", b =>
  631. {
  632. b.HasOne("UnivateProperties_API.Model.Users.Agency", "Agency")
  633. .WithMany("Properties")
  634. .HasForeignKey("AgencyId");
  635. b.HasOne("UnivateProperties_API.Model.Users.Agent", "Agent")
  636. .WithMany("Properties")
  637. .HasForeignKey("AgentId");
  638. b.HasOne("UnivateProperties_API.Model.Region.City", "City")
  639. .WithMany()
  640. .HasForeignKey("CityId")
  641. .OnDelete(DeleteBehavior.Cascade);
  642. b.HasOne("UnivateProperties_API.Model.Users.Individual", "Owner")
  643. .WithMany("Properties")
  644. .HasForeignKey("OwnerId");
  645. b.HasOne("UnivateProperties_API.Model.Properties.PropertyType", "PropertyType")
  646. .WithMany()
  647. .HasForeignKey("PropertyTypeId")
  648. .OnDelete(DeleteBehavior.Cascade);
  649. b.HasOne("UnivateProperties_API.Model.Region.Province", "Province")
  650. .WithMany()
  651. .HasForeignKey("ProvinceId")
  652. .OnDelete(DeleteBehavior.Cascade);
  653. b.HasOne("UnivateProperties_API.Model.Timeshare.Status", "Status")
  654. .WithMany()
  655. .HasForeignKey("StatusId");
  656. b.HasOne("UnivateProperties_API.Model.Region.Suburb", "Suburb")
  657. .WithMany()
  658. .HasForeignKey("SuburbId")
  659. .OnDelete(DeleteBehavior.Cascade);
  660. });
  661. modelBuilder.Entity("UnivateProperties_API.Model.Properties.PropertyImage", b =>
  662. {
  663. b.HasOne("UnivateProperties_API.Model.Properties.Property", "Property")
  664. .WithMany("PropertyImages")
  665. .HasForeignKey("PropertyId")
  666. .OnDelete(DeleteBehavior.Cascade);
  667. });
  668. modelBuilder.Entity("UnivateProperties_API.Model.Properties.PropertyUserField", b =>
  669. {
  670. b.HasOne("UnivateProperties_API.Model.Properties.Property", "Property")
  671. .WithMany("PropertyUserFields")
  672. .HasForeignKey("PropertyId")
  673. .OnDelete(DeleteBehavior.Cascade);
  674. b.HasOne("UnivateProperties_API.Model.Properties.UserDefinedField", "UserDefinedField")
  675. .WithMany()
  676. .HasForeignKey("UserDefinedFieldId")
  677. .OnDelete(DeleteBehavior.Cascade);
  678. });
  679. modelBuilder.Entity("UnivateProperties_API.Model.Properties.UserDefinedField", b =>
  680. {
  681. b.HasOne("UnivateProperties_API.Model.Properties.UserDefinedGroup", "Group")
  682. .WithMany("Fields")
  683. .HasForeignKey("GroupId")
  684. .OnDelete(DeleteBehavior.Cascade);
  685. });
  686. modelBuilder.Entity("UnivateProperties_API.Model.Region.City", b =>
  687. {
  688. b.HasOne("UnivateProperties_API.Model.Region.Province", "Province")
  689. .WithMany()
  690. .HasForeignKey("ProvinceId")
  691. .OnDelete(DeleteBehavior.Cascade);
  692. });
  693. modelBuilder.Entity("UnivateProperties_API.Model.Region.Suburb", b =>
  694. {
  695. b.HasOne("UnivateProperties_API.Model.Region.City", "City")
  696. .WithMany()
  697. .HasForeignKey("CityId")
  698. .OnDelete(DeleteBehavior.Cascade);
  699. });
  700. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.TimeshareWeek", b =>
  701. {
  702. b.HasOne("UnivateProperties_API.Model.Users.Agency", "Agency")
  703. .WithMany()
  704. .HasForeignKey("AgencyId");
  705. b.HasOne("UnivateProperties_API.Model.Users.Agent", "Agent")
  706. .WithMany()
  707. .HasForeignKey("AgentId");
  708. b.HasOne("UnivateProperties_API.Model.Users.Individual", "Owner")
  709. .WithMany()
  710. .HasForeignKey("OwnerId")
  711. .OnDelete(DeleteBehavior.Cascade);
  712. b.HasOne("UnivateProperties_API.Model.Region.Province", "Region")
  713. .WithMany()
  714. .HasForeignKey("RegionId")
  715. .OnDelete(DeleteBehavior.Cascade);
  716. b.HasOne("UnivateProperties_API.Model.Timeshare.Status", "Status")
  717. .WithMany()
  718. .HasForeignKey("StatusId")
  719. .OnDelete(DeleteBehavior.Cascade);
  720. });
  721. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.UnitConfigurationType", b =>
  722. {
  723. b.HasOne("UnivateProperties_API.Model.Timeshare.UnitConfiguration", "UnitConfiguration")
  724. .WithMany("Types")
  725. .HasForeignKey("UnitConfigurationId")
  726. .OnDelete(DeleteBehavior.Cascade);
  727. });
  728. modelBuilder.Entity("UnivateProperties_API.Model.Users.Agent", b =>
  729. {
  730. b.HasOne("UnivateProperties_API.Model.Users.Agency", "Agency")
  731. .WithMany("Agents")
  732. .HasForeignKey("AgencyId");
  733. b.HasOne("UnivateProperties_API.Model.Users.User", "User")
  734. .WithMany()
  735. .HasForeignKey("UserId");
  736. });
  737. modelBuilder.Entity("UnivateProperties_API.Model.Users.Individual", b =>
  738. {
  739. b.HasOne("UnivateProperties_API.Model.Misc.Address", "Address")
  740. .WithMany()
  741. .HasForeignKey("AddressId");
  742. b.HasOne("UnivateProperties_API.Model.Users.User", "User")
  743. .WithMany()
  744. .HasForeignKey("UserId");
  745. });
  746. modelBuilder.Entity("UnivateProperties_API.Model.Users.Person", b =>
  747. {
  748. b.HasOne("UnivateProperties_API.Model.Users.User", "User")
  749. .WithMany()
  750. .HasForeignKey("UserId");
  751. });
  752. #pragma warning restore 612, 618
  753. }
  754. }
  755. }