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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765
  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>("Description");
  79. b.Property<bool>("IsSale");
  80. b.Property<DateTime>("Modified");
  81. b.Property<string>("ModifiedBy");
  82. b.Property<decimal>("OperationalCosts");
  83. b.Property<decimal>("Price");
  84. b.Property<string>("PricePer");
  85. b.Property<string>("PropertyName");
  86. b.Property<int>("PropertyTypeId");
  87. b.Property<int>("ProvinceId");
  88. b.Property<string>("ShortDescription");
  89. b.Property<int>("SuburbId");
  90. b.Property<string>("Unit");
  91. b.HasKey("Id");
  92. b.HasIndex("CityId");
  93. b.HasIndex("PropertyTypeId");
  94. b.HasIndex("ProvinceId");
  95. b.HasIndex("SuburbId");
  96. b.ToTable("Properties");
  97. });
  98. modelBuilder.Entity("UnivateProperties_API.Model.Property.PropertyImage", b =>
  99. {
  100. b.Property<int>("Id")
  101. .ValueGeneratedOnAdd();
  102. b.Property<DateTime>("Created");
  103. b.Property<string>("Image");
  104. b.Property<bool>("IsDefault");
  105. b.Property<DateTime>("Modified");
  106. b.Property<string>("ModifiedBy");
  107. b.Property<int>("PropertyId");
  108. b.HasKey("Id");
  109. b.HasIndex("PropertyId");
  110. b.ToTable("PropertyImages");
  111. });
  112. modelBuilder.Entity("UnivateProperties_API.Model.Property.PropertyType", b =>
  113. {
  114. b.Property<int>("Id")
  115. .ValueGeneratedOnAdd();
  116. b.Property<DateTime>("Created");
  117. b.Property<string>("Description");
  118. b.Property<DateTime>("Modified");
  119. b.Property<string>("ModifiedBy");
  120. b.Property<int>("UsageType");
  121. b.HasKey("Id");
  122. b.ToTable("PropertyTypes");
  123. });
  124. modelBuilder.Entity("UnivateProperties_API.Model.Property.PropertyUserField", b =>
  125. {
  126. b.Property<int>("Id")
  127. .ValueGeneratedOnAdd();
  128. b.Property<DateTime>("Created");
  129. b.Property<string>("Description");
  130. b.Property<DateTime>("Modified");
  131. b.Property<string>("ModifiedBy");
  132. b.Property<int>("PropertyId");
  133. b.Property<int>("UserDefinedFieldId");
  134. b.Property<string>("Value");
  135. b.HasKey("Id");
  136. b.HasIndex("PropertyId");
  137. b.HasIndex("UserDefinedFieldId");
  138. b.ToTable("PropertyUserFields");
  139. });
  140. modelBuilder.Entity("UnivateProperties_API.Model.Property.UserDefinedField", b =>
  141. {
  142. b.Property<int>("Id")
  143. .ValueGeneratedOnAdd();
  144. b.Property<DateTime>("Created");
  145. b.Property<string>("FieldName");
  146. b.Property<string>("FieldType");
  147. b.Property<int>("GroupId");
  148. b.Property<DateTime>("Modified");
  149. b.Property<string>("ModifiedBy");
  150. b.Property<int>("Rank");
  151. b.HasKey("Id");
  152. b.HasIndex("GroupId");
  153. b.ToTable("UserDefinedFields");
  154. });
  155. modelBuilder.Entity("UnivateProperties_API.Model.Property.UserDefinedGroup", b =>
  156. {
  157. b.Property<int>("Id")
  158. .ValueGeneratedOnAdd();
  159. b.Property<DateTime>("Created");
  160. b.Property<string>("Description");
  161. b.Property<DateTime>("Modified");
  162. b.Property<string>("ModifiedBy");
  163. b.Property<int>("Rank");
  164. b.Property<int>("UsageType");
  165. b.HasKey("Id");
  166. b.ToTable("UserDefinedGroups");
  167. });
  168. modelBuilder.Entity("UnivateProperties_API.Model.Region.City", b =>
  169. {
  170. b.Property<int>("Id")
  171. .ValueGeneratedOnAdd();
  172. b.Property<string>("Code");
  173. b.Property<DateTime>("Created");
  174. b.Property<string>("Description");
  175. b.Property<DateTime>("Modified");
  176. b.Property<string>("ModifiedBy");
  177. b.Property<int>("ProvinceId");
  178. b.HasKey("Id");
  179. b.HasIndex("ProvinceId");
  180. b.ToTable("Cities");
  181. });
  182. modelBuilder.Entity("UnivateProperties_API.Model.Region.Province", b =>
  183. {
  184. b.Property<int>("Id")
  185. .ValueGeneratedOnAdd();
  186. b.Property<string>("Code");
  187. b.Property<DateTime>("Created");
  188. b.Property<string>("Description");
  189. b.Property<DateTime>("Modified");
  190. b.Property<string>("ModifiedBy");
  191. b.HasKey("Id");
  192. b.ToTable("Provinces");
  193. });
  194. modelBuilder.Entity("UnivateProperties_API.Model.Region.Suburb", b =>
  195. {
  196. b.Property<int>("Id")
  197. .ValueGeneratedOnAdd();
  198. b.Property<int>("CityId");
  199. b.Property<DateTime>("Created");
  200. b.Property<string>("Description");
  201. b.Property<DateTime>("Modified");
  202. b.Property<string>("ModifiedBy");
  203. b.Property<string>("PostalCode");
  204. b.HasKey("Id");
  205. b.HasIndex("CityId");
  206. b.ToTable("Suburbs");
  207. });
  208. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.Season", b =>
  209. {
  210. b.Property<int>("Id")
  211. .ValueGeneratedOnAdd();
  212. b.Property<DateTime>("Created");
  213. b.Property<DateTime>("Modified");
  214. b.Property<string>("ModifiedBy");
  215. b.Property<string>("Name");
  216. b.HasKey("Id");
  217. b.ToTable("Seasons");
  218. });
  219. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.Status", b =>
  220. {
  221. b.Property<int>("Id")
  222. .ValueGeneratedOnAdd();
  223. b.Property<string>("Code");
  224. b.Property<DateTime>("Created");
  225. b.Property<string>("Description");
  226. b.Property<DateTime>("Modified");
  227. b.Property<string>("ModifiedBy");
  228. b.HasKey("Id");
  229. b.ToTable("Status");
  230. });
  231. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.TimeshareWeek", b =>
  232. {
  233. b.Property<int>("Id")
  234. .ValueGeneratedOnAdd();
  235. b.Property<int>("AgencyId");
  236. b.Property<int>("AgentId");
  237. b.Property<DateTime>("ArrivalDate");
  238. b.Property<string>("BankedWith");
  239. b.Property<DateTime>("Created");
  240. b.Property<bool>("CurrentYearBanked");
  241. b.Property<DateTime>("DepartureDate");
  242. b.Property<bool>("LeviesPaidInFull");
  243. b.Property<double>("LevyAmount");
  244. b.Property<DateTime>("Modified");
  245. b.Property<string>("ModifiedBy");
  246. b.Property<string>("Module");
  247. b.Property<DateTime>("OriginalPurchaseDate");
  248. b.Property<double>("OriginalPurchasePrice");
  249. b.Property<bool>("OtherResort");
  250. b.Property<bool>("ReferedByAgent");
  251. b.Property<int>("RegionId");
  252. b.Property<string>("ResortCode");
  253. b.Property<string>("ResortName");
  254. b.Property<string>("Season");
  255. b.Property<int>("StatusId");
  256. b.Property<int>("UnitConfigurationId");
  257. b.Property<string>("WeekNumber");
  258. b.Property<bool>("WeekPlacedForRental");
  259. b.HasKey("Id");
  260. b.HasIndex("AgencyId");
  261. b.HasIndex("AgentId");
  262. b.HasIndex("RegionId");
  263. b.HasIndex("StatusId");
  264. b.HasIndex("UnitConfigurationId");
  265. b.ToTable("Weeks");
  266. });
  267. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.UnitConfiguration", b =>
  268. {
  269. b.Property<int>("Id")
  270. .ValueGeneratedOnAdd();
  271. b.Property<int>("Adults");
  272. b.Property<int>("Bedrooms");
  273. b.Property<int>("Children");
  274. b.Property<string>("Code");
  275. b.Property<DateTime>("Created");
  276. b.Property<DateTime>("Modified");
  277. b.Property<string>("ModifiedBy");
  278. b.HasKey("Id");
  279. b.HasIndex("Code")
  280. .IsUnique();
  281. b.ToTable("UnitConfigurations");
  282. });
  283. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.UnitConfigurationType", b =>
  284. {
  285. b.Property<int>("Id")
  286. .ValueGeneratedOnAdd();
  287. b.Property<DateTime>("Created");
  288. b.Property<string>("Description");
  289. b.Property<DateTime>("Modified");
  290. b.Property<string>("ModifiedBy");
  291. b.Property<int>("UnitConfigurationId");
  292. b.HasKey("Id");
  293. b.HasIndex("UnitConfigurationId");
  294. b.ToTable("UnitConfigurationTypes");
  295. });
  296. modelBuilder.Entity("UnivateProperties_API.Model.Users.Agency", b =>
  297. {
  298. b.Property<int>("Id")
  299. .ValueGeneratedOnAdd();
  300. b.Property<string>("AgencyName");
  301. b.Property<string>("CompanyRegNumber");
  302. b.Property<DateTime>("Created");
  303. b.Property<string>("EAABEFFCNumber");
  304. b.Property<DateTime>("Modified");
  305. b.Property<string>("ModifiedBy");
  306. b.HasKey("Id");
  307. b.ToTable("Agencies");
  308. });
  309. modelBuilder.Entity("UnivateProperties_API.Model.Users.Agent", b =>
  310. {
  311. b.Property<int>("Id")
  312. .ValueGeneratedOnAdd();
  313. b.Property<int?>("AgencyId");
  314. b.Property<string>("CellNumber");
  315. b.Property<DateTime>("Created");
  316. b.Property<string>("Email");
  317. b.Property<DateTime>("Modified");
  318. b.Property<string>("ModifiedBy");
  319. b.Property<string>("Name");
  320. b.Property<string>("Surname");
  321. b.Property<string>("Telephone");
  322. b.Property<int>("UserId");
  323. b.HasKey("Id");
  324. b.HasIndex("AgencyId");
  325. b.HasIndex("UserId");
  326. b.ToTable("Agents");
  327. });
  328. modelBuilder.Entity("UnivateProperties_API.Model.Users.Individual", b =>
  329. {
  330. b.Property<int>("Id")
  331. .ValueGeneratedOnAdd();
  332. b.Property<string>("CellNumber");
  333. b.Property<DateTime>("Created");
  334. b.Property<string>("Email");
  335. b.Property<DateTime>("Modified");
  336. b.Property<string>("ModifiedBy");
  337. b.Property<string>("Name");
  338. b.Property<string>("Surname");
  339. b.Property<string>("Telephone");
  340. b.Property<int>("UserId");
  341. b.HasKey("Id");
  342. b.HasIndex("UserId");
  343. b.ToTable("Individuals");
  344. });
  345. modelBuilder.Entity("UnivateProperties_API.Model.Users.User", b =>
  346. {
  347. b.Property<int>("Id")
  348. .ValueGeneratedOnAdd();
  349. b.Property<DateTime>("Created");
  350. b.Property<DateTime>("Modified");
  351. b.Property<string>("ModifiedBy");
  352. b.Property<string>("Name");
  353. b.Property<byte[]>("PasswordHash");
  354. b.Property<byte[]>("PasswordSalt");
  355. b.Property<string>("Role");
  356. b.Property<string>("Surname");
  357. b.Property<string>("Token");
  358. b.Property<string>("Username");
  359. b.Property<bool>("Verified");
  360. b.HasKey("Id");
  361. b.ToTable("Users");
  362. });
  363. modelBuilder.Entity("UnivateProperties_API.Model.Communication.Email", b =>
  364. {
  365. b.HasOne("UnivateProperties_API.Model.Communication.SMTPAccount", "Sender")
  366. .WithMany("Emails")
  367. .HasForeignKey("SenderId")
  368. .OnDelete(DeleteBehavior.Cascade);
  369. });
  370. modelBuilder.Entity("UnivateProperties_API.Model.Communication.SMTPAccount", b =>
  371. {
  372. b.HasOne("UnivateProperties_API.Model.Communication.SMTPHost", "SMTPHost")
  373. .WithMany("SMTPAccounts")
  374. .HasForeignKey("SMTPHostId")
  375. .OnDelete(DeleteBehavior.Cascade);
  376. });
  377. modelBuilder.Entity("UnivateProperties_API.Model.Property.Property", b =>
  378. {
  379. b.HasOne("UnivateProperties_API.Model.Region.City", "City")
  380. .WithMany()
  381. .HasForeignKey("CityId")
  382. .OnDelete(DeleteBehavior.Cascade);
  383. b.HasOne("UnivateProperties_API.Model.Property.PropertyType", "PropertyType")
  384. .WithMany()
  385. .HasForeignKey("PropertyTypeId")
  386. .OnDelete(DeleteBehavior.Cascade);
  387. b.HasOne("UnivateProperties_API.Model.Region.Province", "Province")
  388. .WithMany()
  389. .HasForeignKey("ProvinceId")
  390. .OnDelete(DeleteBehavior.Cascade);
  391. b.HasOne("UnivateProperties_API.Model.Region.Suburb", "Suburb")
  392. .WithMany()
  393. .HasForeignKey("SuburbId")
  394. .OnDelete(DeleteBehavior.Cascade);
  395. });
  396. modelBuilder.Entity("UnivateProperties_API.Model.Property.PropertyImage", b =>
  397. {
  398. b.HasOne("UnivateProperties_API.Model.Property.Property", "Property")
  399. .WithMany("PropertyImages")
  400. .HasForeignKey("PropertyId")
  401. .OnDelete(DeleteBehavior.Cascade);
  402. });
  403. modelBuilder.Entity("UnivateProperties_API.Model.Property.PropertyUserField", b =>
  404. {
  405. b.HasOne("UnivateProperties_API.Model.Property.Property", "Property")
  406. .WithMany("PropertyUserFields")
  407. .HasForeignKey("PropertyId")
  408. .OnDelete(DeleteBehavior.Cascade);
  409. b.HasOne("UnivateProperties_API.Model.Property.UserDefinedField", "UserDefinedField")
  410. .WithMany()
  411. .HasForeignKey("UserDefinedFieldId")
  412. .OnDelete(DeleteBehavior.Cascade);
  413. });
  414. modelBuilder.Entity("UnivateProperties_API.Model.Property.UserDefinedField", b =>
  415. {
  416. b.HasOne("UnivateProperties_API.Model.Property.UserDefinedGroup", "Group")
  417. .WithMany("Fields")
  418. .HasForeignKey("GroupId")
  419. .OnDelete(DeleteBehavior.Cascade);
  420. });
  421. modelBuilder.Entity("UnivateProperties_API.Model.Region.City", b =>
  422. {
  423. b.HasOne("UnivateProperties_API.Model.Region.Province", "Province")
  424. .WithMany()
  425. .HasForeignKey("ProvinceId")
  426. .OnDelete(DeleteBehavior.Cascade);
  427. });
  428. modelBuilder.Entity("UnivateProperties_API.Model.Region.Suburb", b =>
  429. {
  430. b.HasOne("UnivateProperties_API.Model.Region.City", "City")
  431. .WithMany()
  432. .HasForeignKey("CityId")
  433. .OnDelete(DeleteBehavior.Cascade);
  434. });
  435. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.TimeshareWeek", b =>
  436. {
  437. b.HasOne("UnivateProperties_API.Model.Users.Agency", "Agency")
  438. .WithMany()
  439. .HasForeignKey("AgencyId")
  440. .OnDelete(DeleteBehavior.Cascade);
  441. b.HasOne("UnivateProperties_API.Model.Users.Agent", "Agent")
  442. .WithMany()
  443. .HasForeignKey("AgentId")
  444. .OnDelete(DeleteBehavior.Cascade);
  445. b.HasOne("UnivateProperties_API.Model.Region.Province", "Region")
  446. .WithMany()
  447. .HasForeignKey("RegionId")
  448. .OnDelete(DeleteBehavior.Cascade);
  449. b.HasOne("UnivateProperties_API.Model.Timeshare.Status", "Status")
  450. .WithMany()
  451. .HasForeignKey("StatusId")
  452. .OnDelete(DeleteBehavior.Cascade);
  453. b.HasOne("UnivateProperties_API.Model.Timeshare.UnitConfiguration", "UnitConfiguration")
  454. .WithMany()
  455. .HasForeignKey("UnitConfigurationId")
  456. .OnDelete(DeleteBehavior.Cascade);
  457. });
  458. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.UnitConfigurationType", b =>
  459. {
  460. b.HasOne("UnivateProperties_API.Model.Timeshare.UnitConfiguration", "UnitConfiguration")
  461. .WithMany("Types")
  462. .HasForeignKey("UnitConfigurationId")
  463. .OnDelete(DeleteBehavior.Cascade);
  464. });
  465. modelBuilder.Entity("UnivateProperties_API.Model.Users.Agent", b =>
  466. {
  467. b.HasOne("UnivateProperties_API.Model.Users.Agency", "Agency")
  468. .WithMany("Agents")
  469. .HasForeignKey("AgencyId");
  470. b.HasOne("UnivateProperties_API.Model.Users.User", "User")
  471. .WithMany()
  472. .HasForeignKey("UserId")
  473. .OnDelete(DeleteBehavior.Cascade);
  474. });
  475. modelBuilder.Entity("UnivateProperties_API.Model.Users.Individual", b =>
  476. {
  477. b.HasOne("UnivateProperties_API.Model.Users.User", "User")
  478. .WithMany()
  479. .HasForeignKey("UserId")
  480. .OnDelete(DeleteBehavior.Cascade);
  481. });
  482. #pragma warning restore 612, 618
  483. }
  484. }
  485. }