API
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

DataContextModelSnapshot.cs 24KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773
  1. // <auto-generated />
  2. using System;
  3. using Microsoft.EntityFrameworkCore;
  4. using Microsoft.EntityFrameworkCore.Infrastructure;
  5. using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
  6. using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
  7. using UnivateProperties_API.Context;
  8. namespace UnivateProperties_API.Migrations
  9. {
  10. [DbContext(typeof(DataContext))]
  11. partial class DataContextModelSnapshot : ModelSnapshot
  12. {
  13. protected override void BuildModel(ModelBuilder modelBuilder)
  14. {
  15. #pragma warning disable 612, 618
  16. modelBuilder
  17. .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn)
  18. .HasAnnotation("ProductVersion", "2.2.4-servicing-10062")
  19. .HasAnnotation("Relational:MaxIdentifierLength", 63);
  20. modelBuilder.Entity("UnivateProperties_API.Model.Communication.Email", b =>
  21. {
  22. b.Property<int>("Id")
  23. .ValueGeneratedOnAdd();
  24. b.Property<string>("BCC");
  25. b.Property<string>("Body");
  26. b.Property<string>("CC");
  27. b.Property<string>("Comment");
  28. b.Property<DateTime>("Created");
  29. b.Property<bool>("IsBodyHtml");
  30. b.Property<DateTime>("Modified");
  31. b.Property<string>("ModifiedBy");
  32. b.Property<int>("SenderId");
  33. b.Property<string>("Subject");
  34. b.Property<string>("To");
  35. b.Property<string>("ToDisplay");
  36. b.HasKey("Id");
  37. b.HasIndex("SenderId");
  38. b.ToTable("Emails");
  39. });
  40. modelBuilder.Entity("UnivateProperties_API.Model.Communication.SMTPAccount", b =>
  41. {
  42. b.Property<int>("Id")
  43. .ValueGeneratedOnAdd();
  44. b.Property<string>("Address");
  45. b.Property<DateTime>("Created");
  46. b.Property<string>("DisplayName");
  47. b.Property<DateTime>("Modified");
  48. b.Property<string>("ModifiedBy");
  49. b.Property<int>("SMTPHostId");
  50. b.HasKey("Id");
  51. b.HasIndex("SMTPHostId");
  52. b.ToTable("Accounts");
  53. });
  54. modelBuilder.Entity("UnivateProperties_API.Model.Communication.SMTPHost", b =>
  55. {
  56. b.Property<int>("Id")
  57. .ValueGeneratedOnAdd();
  58. b.Property<DateTime>("Created");
  59. b.Property<string>("Host");
  60. b.Property<DateTime>("Modified");
  61. b.Property<string>("ModifiedBy");
  62. b.Property<bool>("NeedsAuthorize");
  63. b.Property<string>("Password");
  64. b.Property<bool>("UseSSL");
  65. b.Property<string>("User");
  66. b.HasKey("Id");
  67. b.ToTable("Hosts");
  68. });
  69. modelBuilder.Entity("UnivateProperties_API.Model.Property.Property", b =>
  70. {
  71. b.Property<int>("Id")
  72. .ValueGeneratedOnAdd();
  73. b.Property<string>("AddressLine1");
  74. b.Property<string>("AddressLine2");
  75. b.Property<string>("AddressLine3");
  76. b.Property<int>("CityId");
  77. b.Property<DateTime>("Created");
  78. b.Property<string>("CreatedBy");
  79. b.Property<string>("Description");
  80. b.Property<bool>("IsSale");
  81. b.Property<DateTime>("Modified");
  82. b.Property<string>("ModifiedBy");
  83. b.Property<decimal>("OperationalCosts");
  84. b.Property<decimal>("Price");
  85. b.Property<string>("PricePer");
  86. b.Property<string>("PropertyName");
  87. b.Property<int>("PropertyTypeId");
  88. b.Property<int>("ProvinceId");
  89. b.Property<bool>("Published");
  90. b.Property<string>("ShortDescription");
  91. b.Property<int>("SuburbId");
  92. b.Property<string>("Unit");
  93. b.HasKey("Id");
  94. b.HasIndex("CityId");
  95. b.HasIndex("PropertyTypeId");
  96. b.HasIndex("ProvinceId");
  97. b.HasIndex("SuburbId");
  98. b.ToTable("Properties");
  99. });
  100. modelBuilder.Entity("UnivateProperties_API.Model.Property.PropertyImage", b =>
  101. {
  102. b.Property<int>("Id")
  103. .ValueGeneratedOnAdd();
  104. b.Property<DateTime>("Created");
  105. b.Property<string>("Image");
  106. b.Property<bool>("IsDefault");
  107. b.Property<DateTime>("Modified");
  108. b.Property<string>("ModifiedBy");
  109. b.Property<int>("PropertyId");
  110. b.HasKey("Id");
  111. b.HasIndex("PropertyId");
  112. b.ToTable("PropertyImages");
  113. });
  114. modelBuilder.Entity("UnivateProperties_API.Model.Property.PropertyType", b =>
  115. {
  116. b.Property<int>("Id")
  117. .ValueGeneratedOnAdd();
  118. b.Property<DateTime>("Created");
  119. b.Property<string>("Description");
  120. b.Property<DateTime>("Modified");
  121. b.Property<string>("ModifiedBy");
  122. b.Property<int>("UsageType");
  123. b.HasKey("Id");
  124. b.ToTable("PropertyTypes");
  125. });
  126. modelBuilder.Entity("UnivateProperties_API.Model.Property.PropertyUserField", b =>
  127. {
  128. b.Property<int>("Id")
  129. .ValueGeneratedOnAdd();
  130. b.Property<DateTime>("Created");
  131. b.Property<string>("Description");
  132. b.Property<DateTime>("Modified");
  133. b.Property<string>("ModifiedBy");
  134. b.Property<int>("PropertyId");
  135. b.Property<int>("UserDefinedFieldId");
  136. b.Property<string>("Value");
  137. b.HasKey("Id");
  138. b.HasIndex("PropertyId");
  139. b.HasIndex("UserDefinedFieldId");
  140. b.ToTable("PropertyUserFields");
  141. });
  142. modelBuilder.Entity("UnivateProperties_API.Model.Property.UserDefinedField", b =>
  143. {
  144. b.Property<int>("Id")
  145. .ValueGeneratedOnAdd();
  146. b.Property<DateTime>("Created");
  147. b.Property<string>("FieldName");
  148. b.Property<string>("FieldType");
  149. b.Property<int>("GroupId");
  150. b.Property<DateTime>("Modified");
  151. b.Property<string>("ModifiedBy");
  152. b.Property<int>("Rank");
  153. b.HasKey("Id");
  154. b.HasIndex("GroupId");
  155. b.ToTable("UserDefinedFields");
  156. });
  157. modelBuilder.Entity("UnivateProperties_API.Model.Property.UserDefinedGroup", b =>
  158. {
  159. b.Property<int>("Id")
  160. .ValueGeneratedOnAdd();
  161. b.Property<DateTime>("Created");
  162. b.Property<string>("Description");
  163. b.Property<DateTime>("Modified");
  164. b.Property<string>("ModifiedBy");
  165. b.Property<int>("Rank");
  166. b.Property<int>("UsageType");
  167. b.HasKey("Id");
  168. b.ToTable("UserDefinedGroups");
  169. });
  170. modelBuilder.Entity("UnivateProperties_API.Model.Region.City", b =>
  171. {
  172. b.Property<int>("Id")
  173. .ValueGeneratedOnAdd();
  174. b.Property<string>("Code");
  175. b.Property<DateTime>("Created");
  176. b.Property<string>("Description");
  177. b.Property<DateTime>("Modified");
  178. b.Property<string>("ModifiedBy");
  179. b.Property<int>("ProvinceId");
  180. b.HasKey("Id");
  181. b.HasIndex("ProvinceId");
  182. b.ToTable("Cities");
  183. });
  184. modelBuilder.Entity("UnivateProperties_API.Model.Region.Province", b =>
  185. {
  186. b.Property<int>("Id")
  187. .ValueGeneratedOnAdd();
  188. b.Property<string>("Code");
  189. b.Property<DateTime>("Created");
  190. b.Property<string>("Description");
  191. b.Property<DateTime>("Modified");
  192. b.Property<string>("ModifiedBy");
  193. b.HasKey("Id");
  194. b.ToTable("Provinces");
  195. });
  196. modelBuilder.Entity("UnivateProperties_API.Model.Region.Suburb", b =>
  197. {
  198. b.Property<int>("Id")
  199. .ValueGeneratedOnAdd();
  200. b.Property<int>("CityId");
  201. b.Property<DateTime>("Created");
  202. b.Property<string>("Description");
  203. b.Property<DateTime>("Modified");
  204. b.Property<string>("ModifiedBy");
  205. b.Property<string>("PostalCode");
  206. b.HasKey("Id");
  207. b.HasIndex("CityId");
  208. b.ToTable("Suburbs");
  209. });
  210. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.Season", b =>
  211. {
  212. b.Property<int>("Id")
  213. .ValueGeneratedOnAdd();
  214. b.Property<DateTime>("Created");
  215. b.Property<DateTime>("Modified");
  216. b.Property<string>("ModifiedBy");
  217. b.Property<string>("Name");
  218. b.HasKey("Id");
  219. b.ToTable("Seasons");
  220. });
  221. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.Status", b =>
  222. {
  223. b.Property<int>("Id")
  224. .ValueGeneratedOnAdd();
  225. b.Property<string>("Code");
  226. b.Property<DateTime>("Created");
  227. b.Property<string>("Description");
  228. b.Property<DateTime>("Modified");
  229. b.Property<string>("ModifiedBy");
  230. b.Property<int>("StatusType");
  231. b.HasKey("Id");
  232. b.ToTable("Status");
  233. });
  234. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.TimeshareWeek", b =>
  235. {
  236. b.Property<int>("Id")
  237. .ValueGeneratedOnAdd();
  238. b.Property<int?>("AgencyId");
  239. b.Property<int?>("AgentId");
  240. b.Property<DateTime>("ArrivalDate");
  241. b.Property<string>("BankedWith");
  242. b.Property<int>("Bedrooms");
  243. b.Property<DateTime>("Created");
  244. b.Property<bool>("CurrentYearBanked");
  245. b.Property<DateTime>("DepartureDate");
  246. b.Property<bool>("LeviesPaidInFull");
  247. b.Property<double>("LevyAmount");
  248. b.Property<int>("MaxSleep");
  249. b.Property<DateTime>("Modified");
  250. b.Property<string>("ModifiedBy");
  251. b.Property<string>("Module");
  252. b.Property<DateTime>("OriginalPurchaseDate");
  253. b.Property<double>("OriginalPurchasePrice");
  254. b.Property<bool>("OtherResort");
  255. b.Property<int>("OwnerId");
  256. b.Property<bool>("ReferedByAgent");
  257. b.Property<int>("RegionId");
  258. b.Property<string>("ResortCode");
  259. b.Property<string>("ResortName");
  260. b.Property<string>("Season");
  261. b.Property<int>("StatusId");
  262. b.Property<string>("WeekNumber");
  263. b.Property<bool>("WeekPlacedForRental");
  264. b.HasKey("Id");
  265. b.HasIndex("AgencyId");
  266. b.HasIndex("AgentId");
  267. b.HasIndex("OwnerId");
  268. b.HasIndex("RegionId");
  269. b.HasIndex("StatusId");
  270. b.ToTable("Weeks");
  271. });
  272. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.UnitConfiguration", b =>
  273. {
  274. b.Property<int>("Id")
  275. .ValueGeneratedOnAdd();
  276. b.Property<int>("Adults");
  277. b.Property<int>("Bedrooms");
  278. b.Property<int>("Children");
  279. b.Property<string>("Code");
  280. b.Property<DateTime>("Created");
  281. b.Property<DateTime>("Modified");
  282. b.Property<string>("ModifiedBy");
  283. b.HasKey("Id");
  284. b.HasIndex("Code")
  285. .IsUnique();
  286. b.ToTable("UnitConfigurations");
  287. });
  288. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.UnitConfigurationType", b =>
  289. {
  290. b.Property<int>("Id")
  291. .ValueGeneratedOnAdd();
  292. b.Property<DateTime>("Created");
  293. b.Property<string>("Description");
  294. b.Property<DateTime>("Modified");
  295. b.Property<string>("ModifiedBy");
  296. b.Property<int>("UnitConfigurationId");
  297. b.HasKey("Id");
  298. b.HasIndex("UnitConfigurationId");
  299. b.ToTable("UnitConfigurationTypes");
  300. });
  301. modelBuilder.Entity("UnivateProperties_API.Model.Users.Agency", b =>
  302. {
  303. b.Property<int>("Id")
  304. .ValueGeneratedOnAdd();
  305. b.Property<string>("AgencyName");
  306. b.Property<string>("CompanyRegNumber");
  307. b.Property<DateTime>("Created");
  308. b.Property<string>("EAABEFFCNumber");
  309. b.Property<DateTime>("Modified");
  310. b.Property<string>("ModifiedBy");
  311. b.HasKey("Id");
  312. b.ToTable("Agencies");
  313. });
  314. modelBuilder.Entity("UnivateProperties_API.Model.Users.Agent", b =>
  315. {
  316. b.Property<int>("Id")
  317. .ValueGeneratedOnAdd();
  318. b.Property<int?>("AgencyId");
  319. b.Property<string>("CellNumber");
  320. b.Property<DateTime>("Created");
  321. b.Property<string>("Email");
  322. b.Property<DateTime>("Modified");
  323. b.Property<string>("ModifiedBy");
  324. b.Property<string>("Name");
  325. b.Property<string>("Surname");
  326. b.Property<string>("Telephone");
  327. b.Property<int>("UserId");
  328. b.HasKey("Id");
  329. b.HasIndex("AgencyId");
  330. b.HasIndex("UserId");
  331. b.ToTable("Agents");
  332. });
  333. modelBuilder.Entity("UnivateProperties_API.Model.Users.Individual", b =>
  334. {
  335. b.Property<int>("Id")
  336. .ValueGeneratedOnAdd();
  337. b.Property<string>("CellNumber");
  338. b.Property<DateTime>("Created");
  339. b.Property<string>("Email");
  340. b.Property<DateTime>("Modified");
  341. b.Property<string>("ModifiedBy");
  342. b.Property<string>("Name");
  343. b.Property<string>("Surname");
  344. b.Property<string>("Telephone");
  345. b.Property<int>("UserId");
  346. b.HasKey("Id");
  347. b.HasIndex("UserId");
  348. b.ToTable("Individuals");
  349. });
  350. modelBuilder.Entity("UnivateProperties_API.Model.Users.User", b =>
  351. {
  352. b.Property<int>("Id")
  353. .ValueGeneratedOnAdd();
  354. b.Property<DateTime>("Created");
  355. b.Property<DateTime>("Modified");
  356. b.Property<string>("ModifiedBy");
  357. b.Property<string>("Name");
  358. b.Property<byte[]>("PasswordHash");
  359. b.Property<byte[]>("PasswordSalt");
  360. b.Property<string>("Role");
  361. b.Property<string>("Surname");
  362. b.Property<string>("Token");
  363. b.Property<string>("Username");
  364. b.Property<bool>("Verified");
  365. b.HasKey("Id");
  366. b.ToTable("Users");
  367. });
  368. modelBuilder.Entity("UnivateProperties_API.Model.Communication.Email", b =>
  369. {
  370. b.HasOne("UnivateProperties_API.Model.Communication.SMTPAccount", "Sender")
  371. .WithMany("Emails")
  372. .HasForeignKey("SenderId")
  373. .OnDelete(DeleteBehavior.Cascade);
  374. });
  375. modelBuilder.Entity("UnivateProperties_API.Model.Communication.SMTPAccount", b =>
  376. {
  377. b.HasOne("UnivateProperties_API.Model.Communication.SMTPHost", "SMTPHost")
  378. .WithMany("SMTPAccounts")
  379. .HasForeignKey("SMTPHostId")
  380. .OnDelete(DeleteBehavior.Cascade);
  381. });
  382. modelBuilder.Entity("UnivateProperties_API.Model.Property.Property", b =>
  383. {
  384. b.HasOne("UnivateProperties_API.Model.Region.City", "City")
  385. .WithMany()
  386. .HasForeignKey("CityId")
  387. .OnDelete(DeleteBehavior.Cascade);
  388. b.HasOne("UnivateProperties_API.Model.Property.PropertyType", "PropertyType")
  389. .WithMany()
  390. .HasForeignKey("PropertyTypeId")
  391. .OnDelete(DeleteBehavior.Cascade);
  392. b.HasOne("UnivateProperties_API.Model.Region.Province", "Province")
  393. .WithMany()
  394. .HasForeignKey("ProvinceId")
  395. .OnDelete(DeleteBehavior.Cascade);
  396. b.HasOne("UnivateProperties_API.Model.Region.Suburb", "Suburb")
  397. .WithMany()
  398. .HasForeignKey("SuburbId")
  399. .OnDelete(DeleteBehavior.Cascade);
  400. });
  401. modelBuilder.Entity("UnivateProperties_API.Model.Property.PropertyImage", b =>
  402. {
  403. b.HasOne("UnivateProperties_API.Model.Property.Property", "Property")
  404. .WithMany("PropertyImages")
  405. .HasForeignKey("PropertyId")
  406. .OnDelete(DeleteBehavior.Cascade);
  407. });
  408. modelBuilder.Entity("UnivateProperties_API.Model.Property.PropertyUserField", b =>
  409. {
  410. b.HasOne("UnivateProperties_API.Model.Property.Property", "Property")
  411. .WithMany("PropertyUserFields")
  412. .HasForeignKey("PropertyId")
  413. .OnDelete(DeleteBehavior.Cascade);
  414. b.HasOne("UnivateProperties_API.Model.Property.UserDefinedField", "UserDefinedField")
  415. .WithMany()
  416. .HasForeignKey("UserDefinedFieldId")
  417. .OnDelete(DeleteBehavior.Cascade);
  418. });
  419. modelBuilder.Entity("UnivateProperties_API.Model.Property.UserDefinedField", b =>
  420. {
  421. b.HasOne("UnivateProperties_API.Model.Property.UserDefinedGroup", "Group")
  422. .WithMany("Fields")
  423. .HasForeignKey("GroupId")
  424. .OnDelete(DeleteBehavior.Cascade);
  425. });
  426. modelBuilder.Entity("UnivateProperties_API.Model.Region.City", b =>
  427. {
  428. b.HasOne("UnivateProperties_API.Model.Region.Province", "Province")
  429. .WithMany()
  430. .HasForeignKey("ProvinceId")
  431. .OnDelete(DeleteBehavior.Cascade);
  432. });
  433. modelBuilder.Entity("UnivateProperties_API.Model.Region.Suburb", b =>
  434. {
  435. b.HasOne("UnivateProperties_API.Model.Region.City", "City")
  436. .WithMany()
  437. .HasForeignKey("CityId")
  438. .OnDelete(DeleteBehavior.Cascade);
  439. });
  440. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.TimeshareWeek", b =>
  441. {
  442. b.HasOne("UnivateProperties_API.Model.Users.Agency", "Agency")
  443. .WithMany()
  444. .HasForeignKey("AgencyId");
  445. b.HasOne("UnivateProperties_API.Model.Users.Agent", "Agent")
  446. .WithMany()
  447. .HasForeignKey("AgentId");
  448. b.HasOne("UnivateProperties_API.Model.Users.User", "Owner")
  449. .WithMany()
  450. .HasForeignKey("OwnerId")
  451. .OnDelete(DeleteBehavior.Cascade);
  452. b.HasOne("UnivateProperties_API.Model.Region.Province", "Region")
  453. .WithMany()
  454. .HasForeignKey("RegionId")
  455. .OnDelete(DeleteBehavior.Cascade);
  456. b.HasOne("UnivateProperties_API.Model.Timeshare.Status", "Status")
  457. .WithMany()
  458. .HasForeignKey("StatusId")
  459. .OnDelete(DeleteBehavior.Cascade);
  460. });
  461. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.UnitConfigurationType", b =>
  462. {
  463. b.HasOne("UnivateProperties_API.Model.Timeshare.UnitConfiguration", "UnitConfiguration")
  464. .WithMany("Types")
  465. .HasForeignKey("UnitConfigurationId")
  466. .OnDelete(DeleteBehavior.Cascade);
  467. });
  468. modelBuilder.Entity("UnivateProperties_API.Model.Users.Agent", b =>
  469. {
  470. b.HasOne("UnivateProperties_API.Model.Users.Agency", "Agency")
  471. .WithMany("Agents")
  472. .HasForeignKey("AgencyId");
  473. b.HasOne("UnivateProperties_API.Model.Users.User", "User")
  474. .WithMany()
  475. .HasForeignKey("UserId")
  476. .OnDelete(DeleteBehavior.Cascade);
  477. });
  478. modelBuilder.Entity("UnivateProperties_API.Model.Users.Individual", b =>
  479. {
  480. b.HasOne("UnivateProperties_API.Model.Users.User", "User")
  481. .WithMany()
  482. .HasForeignKey("UserId")
  483. .OnDelete(DeleteBehavior.Cascade);
  484. });
  485. #pragma warning restore 612, 618
  486. }
  487. }
  488. }