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.

20191014123718_Location_Templates2.Designer.cs 36KB

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