API
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

20190828083244_1124.Designer.cs 24KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767
  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("20190828083244_1124")]
  13. partial class _1124
  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.4-servicing-10062")
  21. .HasAnnotation("Relational:MaxIdentifierLength", 63);
  22. modelBuilder.Entity("UnivateProperties_API.Model.Communication.Email", b =>
  23. {
  24. b.Property<int>("Id")
  25. .ValueGeneratedOnAdd();
  26. b.Property<string>("BCC");
  27. b.Property<string>("Body");
  28. b.Property<string>("CC");
  29. b.Property<string>("Comment");
  30. b.Property<DateTime>("Created");
  31. b.Property<bool>("IsBodyHtml");
  32. b.Property<DateTime>("Modified");
  33. b.Property<string>("ModifiedBy");
  34. b.Property<int>("SenderId");
  35. b.Property<string>("Subject");
  36. b.Property<string>("To");
  37. b.Property<string>("ToDisplay");
  38. b.HasKey("Id");
  39. b.HasIndex("SenderId");
  40. b.ToTable("Emails");
  41. });
  42. modelBuilder.Entity("UnivateProperties_API.Model.Communication.SMTPAccount", b =>
  43. {
  44. b.Property<int>("Id")
  45. .ValueGeneratedOnAdd();
  46. b.Property<string>("Address");
  47. b.Property<DateTime>("Created");
  48. b.Property<string>("DisplayName");
  49. b.Property<DateTime>("Modified");
  50. b.Property<string>("ModifiedBy");
  51. b.Property<int>("SMTPHostId");
  52. b.HasKey("Id");
  53. b.HasIndex("SMTPHostId");
  54. b.ToTable("Accounts");
  55. });
  56. modelBuilder.Entity("UnivateProperties_API.Model.Communication.SMTPHost", b =>
  57. {
  58. b.Property<int>("Id")
  59. .ValueGeneratedOnAdd();
  60. b.Property<DateTime>("Created");
  61. b.Property<string>("Host");
  62. b.Property<DateTime>("Modified");
  63. b.Property<string>("ModifiedBy");
  64. b.Property<bool>("NeedsAuthorize");
  65. b.Property<string>("Password");
  66. b.Property<bool>("UseSSL");
  67. b.Property<string>("User");
  68. b.HasKey("Id");
  69. b.ToTable("Hosts");
  70. });
  71. modelBuilder.Entity("UnivateProperties_API.Model.Property.Property", b =>
  72. {
  73. b.Property<int>("Id")
  74. .ValueGeneratedOnAdd();
  75. b.Property<string>("AddressLine1");
  76. b.Property<string>("AddressLine2");
  77. b.Property<string>("AddressLine3");
  78. b.Property<int>("CityId");
  79. b.Property<DateTime>("Created");
  80. b.Property<string>("Description");
  81. b.Property<bool>("IsSale");
  82. b.Property<DateTime>("Modified");
  83. b.Property<string>("ModifiedBy");
  84. b.Property<decimal>("OperationalCosts");
  85. b.Property<decimal>("Price");
  86. b.Property<string>("PricePer");
  87. b.Property<string>("PropertyName");
  88. b.Property<int>("PropertyTypeId");
  89. b.Property<int>("ProvinceId");
  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.HasKey("Id");
  231. b.ToTable("Status");
  232. });
  233. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.TimeshareWeek", b =>
  234. {
  235. b.Property<int>("Id")
  236. .ValueGeneratedOnAdd();
  237. b.Property<int>("AgencyId");
  238. b.Property<int>("AgentId");
  239. b.Property<DateTime>("ArrivalDate");
  240. b.Property<string>("BankedWith");
  241. b.Property<DateTime>("Created");
  242. b.Property<bool>("CurrentYearBanked");
  243. b.Property<DateTime>("DepartureDate");
  244. b.Property<bool>("LeviesPaidInFull");
  245. b.Property<double>("LevyAmount");
  246. b.Property<DateTime>("Modified");
  247. b.Property<string>("ModifiedBy");
  248. b.Property<string>("Module");
  249. b.Property<DateTime>("OriginalPurchaseDate");
  250. b.Property<double>("OriginalPurchasePrice");
  251. b.Property<bool>("OtherResort");
  252. b.Property<bool>("ReferedByAgent");
  253. b.Property<int>("RegionId");
  254. b.Property<string>("ResortCode");
  255. b.Property<string>("ResortName");
  256. b.Property<string>("Season");
  257. b.Property<int>("StatusId");
  258. b.Property<int>("UnitConfigurationId");
  259. b.Property<string>("WeekNumber");
  260. b.Property<bool>("WeekPlacedForRental");
  261. b.HasKey("Id");
  262. b.HasIndex("AgencyId");
  263. b.HasIndex("AgentId");
  264. b.HasIndex("RegionId");
  265. b.HasIndex("StatusId");
  266. b.HasIndex("UnitConfigurationId");
  267. b.ToTable("Weeks");
  268. });
  269. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.UnitConfiguration", b =>
  270. {
  271. b.Property<int>("Id")
  272. .ValueGeneratedOnAdd();
  273. b.Property<int>("Adults");
  274. b.Property<int>("Bedrooms");
  275. b.Property<int>("Children");
  276. b.Property<string>("Code");
  277. b.Property<DateTime>("Created");
  278. b.Property<DateTime>("Modified");
  279. b.Property<string>("ModifiedBy");
  280. b.HasKey("Id");
  281. b.HasIndex("Code")
  282. .IsUnique();
  283. b.ToTable("UnitConfigurations");
  284. });
  285. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.UnitConfigurationType", b =>
  286. {
  287. b.Property<int>("Id")
  288. .ValueGeneratedOnAdd();
  289. b.Property<DateTime>("Created");
  290. b.Property<string>("Description");
  291. b.Property<DateTime>("Modified");
  292. b.Property<string>("ModifiedBy");
  293. b.Property<int>("UnitConfigurationId");
  294. b.HasKey("Id");
  295. b.HasIndex("UnitConfigurationId");
  296. b.ToTable("UnitConfigurationTypes");
  297. });
  298. modelBuilder.Entity("UnivateProperties_API.Model.Users.Agency", b =>
  299. {
  300. b.Property<int>("Id")
  301. .ValueGeneratedOnAdd();
  302. b.Property<string>("AgencyName");
  303. b.Property<string>("CompanyRegNumber");
  304. b.Property<DateTime>("Created");
  305. b.Property<string>("EAABEFFCNumber");
  306. b.Property<DateTime>("Modified");
  307. b.Property<string>("ModifiedBy");
  308. b.HasKey("Id");
  309. b.ToTable("Agencies");
  310. });
  311. modelBuilder.Entity("UnivateProperties_API.Model.Users.Agent", b =>
  312. {
  313. b.Property<int>("Id")
  314. .ValueGeneratedOnAdd();
  315. b.Property<int?>("AgencyId");
  316. b.Property<string>("CellNumber");
  317. b.Property<DateTime>("Created");
  318. b.Property<string>("Email");
  319. b.Property<DateTime>("Modified");
  320. b.Property<string>("ModifiedBy");
  321. b.Property<string>("Name");
  322. b.Property<string>("Surname");
  323. b.Property<string>("Telephone");
  324. b.Property<int>("UserId");
  325. b.HasKey("Id");
  326. b.HasIndex("AgencyId");
  327. b.HasIndex("UserId");
  328. b.ToTable("Agents");
  329. });
  330. modelBuilder.Entity("UnivateProperties_API.Model.Users.Individual", b =>
  331. {
  332. b.Property<int>("Id")
  333. .ValueGeneratedOnAdd();
  334. b.Property<string>("CellNumber");
  335. b.Property<DateTime>("Created");
  336. b.Property<string>("Email");
  337. b.Property<DateTime>("Modified");
  338. b.Property<string>("ModifiedBy");
  339. b.Property<string>("Name");
  340. b.Property<string>("Surname");
  341. b.Property<string>("Telephone");
  342. b.Property<int>("UserId");
  343. b.HasKey("Id");
  344. b.HasIndex("UserId");
  345. b.ToTable("Individuals");
  346. });
  347. modelBuilder.Entity("UnivateProperties_API.Model.Users.User", b =>
  348. {
  349. b.Property<int>("Id")
  350. .ValueGeneratedOnAdd();
  351. b.Property<DateTime>("Created");
  352. b.Property<DateTime>("Modified");
  353. b.Property<string>("ModifiedBy");
  354. b.Property<string>("Name");
  355. b.Property<byte[]>("PasswordHash");
  356. b.Property<byte[]>("PasswordSalt");
  357. b.Property<string>("Role");
  358. b.Property<string>("Surname");
  359. b.Property<string>("Token");
  360. b.Property<string>("Username");
  361. b.Property<bool>("Verified");
  362. b.HasKey("Id");
  363. b.ToTable("Users");
  364. });
  365. modelBuilder.Entity("UnivateProperties_API.Model.Communication.Email", b =>
  366. {
  367. b.HasOne("UnivateProperties_API.Model.Communication.SMTPAccount", "Sender")
  368. .WithMany("Emails")
  369. .HasForeignKey("SenderId")
  370. .OnDelete(DeleteBehavior.Cascade);
  371. });
  372. modelBuilder.Entity("UnivateProperties_API.Model.Communication.SMTPAccount", b =>
  373. {
  374. b.HasOne("UnivateProperties_API.Model.Communication.SMTPHost", "SMTPHost")
  375. .WithMany("SMTPAccounts")
  376. .HasForeignKey("SMTPHostId")
  377. .OnDelete(DeleteBehavior.Cascade);
  378. });
  379. modelBuilder.Entity("UnivateProperties_API.Model.Property.Property", b =>
  380. {
  381. b.HasOne("UnivateProperties_API.Model.Region.City", "City")
  382. .WithMany()
  383. .HasForeignKey("CityId")
  384. .OnDelete(DeleteBehavior.Cascade);
  385. b.HasOne("UnivateProperties_API.Model.Property.PropertyType", "PropertyType")
  386. .WithMany()
  387. .HasForeignKey("PropertyTypeId")
  388. .OnDelete(DeleteBehavior.Cascade);
  389. b.HasOne("UnivateProperties_API.Model.Region.Province", "Province")
  390. .WithMany()
  391. .HasForeignKey("ProvinceId")
  392. .OnDelete(DeleteBehavior.Cascade);
  393. b.HasOne("UnivateProperties_API.Model.Region.Suburb", "Suburb")
  394. .WithMany()
  395. .HasForeignKey("SuburbId")
  396. .OnDelete(DeleteBehavior.Cascade);
  397. });
  398. modelBuilder.Entity("UnivateProperties_API.Model.Property.PropertyImage", b =>
  399. {
  400. b.HasOne("UnivateProperties_API.Model.Property.Property", "Property")
  401. .WithMany("PropertyImages")
  402. .HasForeignKey("PropertyId")
  403. .OnDelete(DeleteBehavior.Cascade);
  404. });
  405. modelBuilder.Entity("UnivateProperties_API.Model.Property.PropertyUserField", b =>
  406. {
  407. b.HasOne("UnivateProperties_API.Model.Property.Property", "Property")
  408. .WithMany("PropertyUserFields")
  409. .HasForeignKey("PropertyId")
  410. .OnDelete(DeleteBehavior.Cascade);
  411. b.HasOne("UnivateProperties_API.Model.Property.UserDefinedField", "UserDefinedField")
  412. .WithMany()
  413. .HasForeignKey("UserDefinedFieldId")
  414. .OnDelete(DeleteBehavior.Cascade);
  415. });
  416. modelBuilder.Entity("UnivateProperties_API.Model.Property.UserDefinedField", b =>
  417. {
  418. b.HasOne("UnivateProperties_API.Model.Property.UserDefinedGroup", "Group")
  419. .WithMany("Fields")
  420. .HasForeignKey("GroupId")
  421. .OnDelete(DeleteBehavior.Cascade);
  422. });
  423. modelBuilder.Entity("UnivateProperties_API.Model.Region.City", b =>
  424. {
  425. b.HasOne("UnivateProperties_API.Model.Region.Province", "Province")
  426. .WithMany()
  427. .HasForeignKey("ProvinceId")
  428. .OnDelete(DeleteBehavior.Cascade);
  429. });
  430. modelBuilder.Entity("UnivateProperties_API.Model.Region.Suburb", b =>
  431. {
  432. b.HasOne("UnivateProperties_API.Model.Region.City", "City")
  433. .WithMany()
  434. .HasForeignKey("CityId")
  435. .OnDelete(DeleteBehavior.Cascade);
  436. });
  437. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.TimeshareWeek", b =>
  438. {
  439. b.HasOne("UnivateProperties_API.Model.Users.Agency", "Agency")
  440. .WithMany()
  441. .HasForeignKey("AgencyId")
  442. .OnDelete(DeleteBehavior.Cascade);
  443. b.HasOne("UnivateProperties_API.Model.Users.Agent", "Agent")
  444. .WithMany()
  445. .HasForeignKey("AgentId")
  446. .OnDelete(DeleteBehavior.Cascade);
  447. b.HasOne("UnivateProperties_API.Model.Region.Province", "Region")
  448. .WithMany()
  449. .HasForeignKey("RegionId")
  450. .OnDelete(DeleteBehavior.Cascade);
  451. b.HasOne("UnivateProperties_API.Model.Timeshare.Status", "Status")
  452. .WithMany()
  453. .HasForeignKey("StatusId")
  454. .OnDelete(DeleteBehavior.Cascade);
  455. b.HasOne("UnivateProperties_API.Model.Timeshare.UnitConfiguration", "UnitConfiguration")
  456. .WithMany()
  457. .HasForeignKey("UnitConfigurationId")
  458. .OnDelete(DeleteBehavior.Cascade);
  459. });
  460. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.UnitConfigurationType", b =>
  461. {
  462. b.HasOne("UnivateProperties_API.Model.Timeshare.UnitConfiguration", "UnitConfiguration")
  463. .WithMany("Types")
  464. .HasForeignKey("UnitConfigurationId")
  465. .OnDelete(DeleteBehavior.Cascade);
  466. });
  467. modelBuilder.Entity("UnivateProperties_API.Model.Users.Agent", b =>
  468. {
  469. b.HasOne("UnivateProperties_API.Model.Users.Agency", "Agency")
  470. .WithMany("Agents")
  471. .HasForeignKey("AgencyId");
  472. b.HasOne("UnivateProperties_API.Model.Users.User", "User")
  473. .WithMany()
  474. .HasForeignKey("UserId")
  475. .OnDelete(DeleteBehavior.Cascade);
  476. });
  477. modelBuilder.Entity("UnivateProperties_API.Model.Users.Individual", b =>
  478. {
  479. b.HasOne("UnivateProperties_API.Model.Users.User", "User")
  480. .WithMany()
  481. .HasForeignKey("UserId")
  482. .OnDelete(DeleteBehavior.Cascade);
  483. });
  484. #pragma warning restore 612, 618
  485. }
  486. }
  487. }