API
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

DataContextModelSnapshot.cs 36KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197
  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.6-servicing-10079")
  19. .HasAnnotation("Relational:MaxIdentifierLength", 63);
  20. modelBuilder.Entity("UnivateProperties_API.Model.Banks.Bank", b =>
  21. {
  22. b.Property<int>("Id")
  23. .ValueGeneratedOnAdd();
  24. b.Property<DateTime>("Created");
  25. b.Property<bool>("IsDeleted");
  26. b.Property<DateTime>("Modified");
  27. b.Property<string>("ModifiedBy");
  28. b.Property<string>("Name");
  29. b.Property<string>("UniversalBranchCode");
  30. b.HasKey("Id");
  31. b.ToTable("Banks");
  32. });
  33. modelBuilder.Entity("UnivateProperties_API.Model.Banks.BankAccount", b =>
  34. {
  35. b.Property<int>("Id")
  36. .ValueGeneratedOnAdd();
  37. b.Property<string>("AccountHolder");
  38. b.Property<string>("AccountNumber");
  39. b.Property<int>("BankId");
  40. b.Property<DateTime>("Created");
  41. b.Property<bool>("IsDeleted");
  42. b.Property<DateTime>("Modified");
  43. b.Property<string>("ModifiedBy");
  44. b.Property<int?>("OwnerId");
  45. b.HasKey("Id");
  46. b.HasIndex("BankId");
  47. b.HasIndex("OwnerId");
  48. b.ToTable("BankAccounts");
  49. });
  50. modelBuilder.Entity("UnivateProperties_API.Model.Communication.Email", b =>
  51. {
  52. b.Property<int>("Id")
  53. .ValueGeneratedOnAdd();
  54. b.Property<string>("BCC");
  55. b.Property<string>("Body");
  56. b.Property<string>("CC");
  57. b.Property<string>("Comment");
  58. b.Property<DateTime>("Created");
  59. b.Property<bool>("IsBodyHtml");
  60. b.Property<bool>("IsDeleted");
  61. b.Property<DateTime>("Modified");
  62. b.Property<string>("ModifiedBy");
  63. b.Property<int>("SenderId");
  64. b.Property<string>("Subject");
  65. b.Property<string>("To");
  66. b.Property<string>("ToDisplay");
  67. b.HasKey("Id");
  68. b.HasIndex("SenderId");
  69. b.ToTable("Emails");
  70. });
  71. modelBuilder.Entity("UnivateProperties_API.Model.Communication.PlaceHolder", b =>
  72. {
  73. b.Property<int>("Id")
  74. .ValueGeneratedOnAdd();
  75. b.Property<string>("BoundTo");
  76. b.Property<string>("Name");
  77. b.Property<int>("TemplateId");
  78. b.HasKey("Id");
  79. b.HasIndex("TemplateId");
  80. b.ToTable("PlaceHolders");
  81. });
  82. modelBuilder.Entity("UnivateProperties_API.Model.Communication.SMTPAccount", b =>
  83. {
  84. b.Property<int>("Id")
  85. .ValueGeneratedOnAdd();
  86. b.Property<string>("Address");
  87. b.Property<DateTime>("Created");
  88. b.Property<string>("DisplayName");
  89. b.Property<bool>("IsDeleted");
  90. b.Property<DateTime>("Modified");
  91. b.Property<string>("ModifiedBy");
  92. b.Property<int>("SMTPHostId");
  93. b.HasKey("Id");
  94. b.HasIndex("SMTPHostId");
  95. b.ToTable("Accounts");
  96. });
  97. modelBuilder.Entity("UnivateProperties_API.Model.Communication.SMTPHost", b =>
  98. {
  99. b.Property<int>("Id")
  100. .ValueGeneratedOnAdd();
  101. b.Property<DateTime>("Created");
  102. b.Property<string>("Host");
  103. b.Property<bool>("IsDeleted");
  104. b.Property<DateTime>("Modified");
  105. b.Property<string>("ModifiedBy");
  106. b.Property<bool>("NeedsAuthorize");
  107. b.Property<string>("Password");
  108. b.Property<bool>("UseSSL");
  109. b.Property<string>("User");
  110. b.HasKey("Id");
  111. b.ToTable("Hosts");
  112. });
  113. modelBuilder.Entity("UnivateProperties_API.Model.Communication.Template", b =>
  114. {
  115. b.Property<int>("Id")
  116. .ValueGeneratedOnAdd();
  117. b.Property<string>("Body");
  118. b.Property<DateTime>("Created");
  119. b.Property<bool>("IsDeleted");
  120. b.Property<DateTime>("Modified");
  121. b.Property<string>("ModifiedBy");
  122. b.Property<string>("Name");
  123. b.Property<string>("Subject");
  124. b.HasKey("Id");
  125. b.ToTable("Templates");
  126. });
  127. modelBuilder.Entity("UnivateProperties_API.Model.Logging.SearchLog", b =>
  128. {
  129. b.Property<int>("Id")
  130. .ValueGeneratedOnAdd();
  131. b.Property<DateTime>("Created");
  132. b.Property<bool>("IsDeleted");
  133. b.Property<DateTime>("Modified");
  134. b.Property<string>("ModifiedBy");
  135. b.Property<string>("Search");
  136. b.Property<string>("Type");
  137. b.HasKey("Id");
  138. b.ToTable("SearchLogs");
  139. });
  140. modelBuilder.Entity("UnivateProperties_API.Model.Misc.Address", b =>
  141. {
  142. b.Property<int>("Id")
  143. .ValueGeneratedOnAdd();
  144. b.Property<string>("City");
  145. b.Property<DateTime>("Created");
  146. b.Property<bool>("IsDeleted");
  147. b.Property<DateTime>("Modified");
  148. b.Property<string>("ModifiedBy");
  149. b.Property<string>("PostalCode");
  150. b.Property<string>("Street");
  151. b.Property<string>("StreetNumber");
  152. b.Property<string>("Suburb");
  153. b.HasKey("Id");
  154. b.ToTable("Addresses");
  155. });
  156. modelBuilder.Entity("UnivateProperties_API.Model.Misc.Location", b =>
  157. {
  158. b.Property<int>("Id")
  159. .ValueGeneratedOnAdd();
  160. b.Property<DateTime>("Created");
  161. b.Property<bool>("IsDeleted");
  162. b.Property<bool>("IsTesting");
  163. b.Property<DateTime>("Modified");
  164. b.Property<string>("ModifiedBy");
  165. b.Property<string>("PropertyImageLocation");
  166. b.HasKey("Id");
  167. b.ToTable("Location");
  168. });
  169. modelBuilder.Entity("UnivateProperties_API.Model.ProcessFlow.BidItem", b =>
  170. {
  171. b.Property<int>("Id")
  172. .ValueGeneratedOnAdd();
  173. b.Property<double>("Amount");
  174. b.Property<int?>("BidMakerId");
  175. b.Property<string>("Comment");
  176. b.Property<DateTime>("Created");
  177. b.Property<string>("DeclinedReason");
  178. b.Property<bool>("IsDeleted");
  179. b.Property<DateTime>("Modified");
  180. b.Property<string>("ModifiedBy");
  181. b.Property<int?>("PropertyId");
  182. b.Property<int?>("StatusId");
  183. b.Property<int?>("TimeshareWeekId");
  184. b.HasKey("Id");
  185. b.HasIndex("BidMakerId");
  186. b.HasIndex("PropertyId");
  187. b.HasIndex("StatusId");
  188. b.HasIndex("TimeshareWeekId");
  189. b.ToTable("BidItems");
  190. });
  191. modelBuilder.Entity("UnivateProperties_API.Model.ProcessFlow.ProcessFlow", b =>
  192. {
  193. b.Property<int>("Id")
  194. .ValueGeneratedOnAdd();
  195. b.Property<DateTime>("Created");
  196. b.Property<bool>("IsDeleted");
  197. b.Property<DateTime>("Modified");
  198. b.Property<string>("ModifiedBy");
  199. b.Property<int?>("PropertyID");
  200. b.Property<int>("StatusID");
  201. b.Property<int?>("TimeshareID");
  202. b.HasKey("Id");
  203. b.HasIndex("PropertyID");
  204. b.HasIndex("StatusID");
  205. b.HasIndex("TimeshareID");
  206. b.ToTable("ProcessFlows");
  207. });
  208. modelBuilder.Entity("UnivateProperties_API.Model.Properties.Property", b =>
  209. {
  210. b.Property<int>("Id")
  211. .ValueGeneratedOnAdd();
  212. b.Property<string>("AddressLine1");
  213. b.Property<string>("AddressLine2");
  214. b.Property<string>("AddressLine3");
  215. b.Property<int?>("AgencyId");
  216. b.Property<int?>("AgentId");
  217. b.Property<int>("CityId");
  218. b.Property<DateTime>("Created");
  219. b.Property<string>("Description");
  220. b.Property<bool>("IsDeleted");
  221. b.Property<bool>("IsSale");
  222. b.Property<DateTime>("Modified");
  223. b.Property<string>("ModifiedBy");
  224. b.Property<decimal>("OperationalCosts");
  225. b.Property<int?>("OwnerId");
  226. b.Property<decimal>("Price");
  227. b.Property<string>("PricePer");
  228. b.Property<string>("PropertyName");
  229. b.Property<int>("PropertyTypeId");
  230. b.Property<int>("ProvinceId");
  231. b.Property<bool>("Published");
  232. b.Property<string>("ShortDescription");
  233. b.Property<int?>("StatusId");
  234. b.Property<int>("SuburbId");
  235. b.Property<string>("Unit");
  236. b.HasKey("Id");
  237. b.HasIndex("AgencyId");
  238. b.HasIndex("AgentId");
  239. b.HasIndex("CityId");
  240. b.HasIndex("OwnerId");
  241. b.HasIndex("PropertyTypeId");
  242. b.HasIndex("ProvinceId");
  243. b.HasIndex("StatusId");
  244. b.HasIndex("SuburbId");
  245. b.ToTable("Properties");
  246. });
  247. modelBuilder.Entity("UnivateProperties_API.Model.Properties.PropertyImage", b =>
  248. {
  249. b.Property<int>("Id")
  250. .ValueGeneratedOnAdd();
  251. b.Property<DateTime>("Created");
  252. b.Property<string>("Image");
  253. b.Property<bool>("IsDefault");
  254. b.Property<bool>("IsDeleted");
  255. b.Property<DateTime>("Modified");
  256. b.Property<string>("ModifiedBy");
  257. b.Property<int>("PropertyId");
  258. b.HasKey("Id");
  259. b.HasIndex("PropertyId");
  260. b.ToTable("PropertyImages");
  261. });
  262. modelBuilder.Entity("UnivateProperties_API.Model.Properties.PropertyType", b =>
  263. {
  264. b.Property<int>("Id")
  265. .ValueGeneratedOnAdd();
  266. b.Property<DateTime>("Created");
  267. b.Property<string>("Description");
  268. b.Property<bool>("IsDeleted");
  269. b.Property<DateTime>("Modified");
  270. b.Property<string>("ModifiedBy");
  271. b.Property<int>("UsageType");
  272. b.HasKey("Id");
  273. b.ToTable("PropertyTypes");
  274. });
  275. modelBuilder.Entity("UnivateProperties_API.Model.Properties.PropertyUserField", b =>
  276. {
  277. b.Property<int>("Id")
  278. .ValueGeneratedOnAdd();
  279. b.Property<DateTime>("Created");
  280. b.Property<string>("Description");
  281. b.Property<bool>("IsDeleted");
  282. b.Property<DateTime>("Modified");
  283. b.Property<string>("ModifiedBy");
  284. b.Property<int>("PropertyId");
  285. b.Property<int>("UserDefinedFieldId");
  286. b.Property<string>("Value");
  287. b.HasKey("Id");
  288. b.HasIndex("PropertyId");
  289. b.HasIndex("UserDefinedFieldId");
  290. b.ToTable("PropertyUserFields");
  291. });
  292. modelBuilder.Entity("UnivateProperties_API.Model.Properties.UserDefinedField", b =>
  293. {
  294. b.Property<int>("Id")
  295. .ValueGeneratedOnAdd();
  296. b.Property<DateTime>("Created");
  297. b.Property<string>("FieldName");
  298. b.Property<string>("FieldType");
  299. b.Property<int>("GroupId");
  300. b.Property<bool>("IsDeleted");
  301. b.Property<DateTime>("Modified");
  302. b.Property<string>("ModifiedBy");
  303. b.Property<int>("Rank");
  304. b.HasKey("Id");
  305. b.HasIndex("GroupId");
  306. b.ToTable("UserDefinedFields");
  307. });
  308. modelBuilder.Entity("UnivateProperties_API.Model.Properties.UserDefinedGroup", b =>
  309. {
  310. b.Property<int>("Id")
  311. .ValueGeneratedOnAdd();
  312. b.Property<DateTime>("Created");
  313. b.Property<string>("Description");
  314. b.Property<bool>("IsDeleted");
  315. b.Property<DateTime>("Modified");
  316. b.Property<string>("ModifiedBy");
  317. b.Property<int>("Rank");
  318. b.Property<int>("UsageType");
  319. b.HasKey("Id");
  320. b.ToTable("UserDefinedGroups");
  321. });
  322. modelBuilder.Entity("UnivateProperties_API.Model.Region.City", b =>
  323. {
  324. b.Property<int>("Id")
  325. .ValueGeneratedOnAdd();
  326. b.Property<string>("Code");
  327. b.Property<DateTime>("Created");
  328. b.Property<string>("Description");
  329. b.Property<bool>("IsDeleted");
  330. b.Property<DateTime>("Modified");
  331. b.Property<string>("ModifiedBy");
  332. b.Property<int>("ProvinceId");
  333. b.HasKey("Id");
  334. b.HasIndex("ProvinceId");
  335. b.ToTable("Cities");
  336. });
  337. modelBuilder.Entity("UnivateProperties_API.Model.Region.Province", b =>
  338. {
  339. b.Property<int>("Id")
  340. .ValueGeneratedOnAdd();
  341. b.Property<string>("Code");
  342. b.Property<DateTime>("Created");
  343. b.Property<string>("Description");
  344. b.Property<bool>("IsDeleted");
  345. b.Property<DateTime>("Modified");
  346. b.Property<string>("ModifiedBy");
  347. b.HasKey("Id");
  348. b.ToTable("Provinces");
  349. });
  350. modelBuilder.Entity("UnivateProperties_API.Model.Region.Suburb", b =>
  351. {
  352. b.Property<int>("Id")
  353. .ValueGeneratedOnAdd();
  354. b.Property<int>("CityId");
  355. b.Property<DateTime>("Created");
  356. b.Property<string>("Description");
  357. b.Property<bool>("IsDeleted");
  358. b.Property<DateTime>("Modified");
  359. b.Property<string>("ModifiedBy");
  360. b.Property<string>("PostalCode");
  361. b.HasKey("Id");
  362. b.HasIndex("CityId");
  363. b.ToTable("Suburbs");
  364. });
  365. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.Season", b =>
  366. {
  367. b.Property<int>("Id")
  368. .ValueGeneratedOnAdd();
  369. b.Property<DateTime>("Created");
  370. b.Property<bool>("IsDeleted");
  371. b.Property<DateTime>("Modified");
  372. b.Property<string>("ModifiedBy");
  373. b.Property<string>("Name");
  374. b.HasKey("Id");
  375. b.ToTable("Seasons");
  376. });
  377. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.Status", b =>
  378. {
  379. b.Property<int>("Id")
  380. .ValueGeneratedOnAdd();
  381. b.Property<string>("Code");
  382. b.Property<DateTime>("Created");
  383. b.Property<string>("Description");
  384. b.Property<bool>("IsDeleted");
  385. b.Property<DateTime>("Modified");
  386. b.Property<string>("ModifiedBy");
  387. b.Property<int>("StatusType");
  388. b.HasKey("Id");
  389. b.ToTable("Status");
  390. });
  391. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.TimeshareWeek", b =>
  392. {
  393. b.Property<int>("Id")
  394. .ValueGeneratedOnAdd();
  395. b.Property<int?>("AgencyId");
  396. b.Property<bool>("AgentAsRep");
  397. b.Property<int?>("AgentId");
  398. b.Property<DateTime>("ArrivalDate");
  399. b.Property<string>("BankedWith");
  400. b.Property<int>("Bedrooms");
  401. b.Property<DateTime>("Created");
  402. b.Property<bool>("CurrentYearBanked");
  403. b.Property<DateTime>("DepartureDate");
  404. b.Property<bool>("IsDeleted");
  405. b.Property<bool>("LeviesPaidInFull");
  406. b.Property<double>("LevyAmount");
  407. b.Property<int>("MaxSleep");
  408. b.Property<DateTime>("Modified");
  409. b.Property<string>("ModifiedBy");
  410. b.Property<string>("Module");
  411. b.Property<DateTime>("OriginalPurchaseDate");
  412. b.Property<double>("OriginalPurchasePrice");
  413. b.Property<bool>("OtherResort");
  414. b.Property<int>("OwnerId");
  415. b.Property<bool>("ReferedByAgent");
  416. b.Property<int>("RegionId");
  417. b.Property<string>("ResortCode");
  418. b.Property<string>("ResortName");
  419. b.Property<string>("Season");
  420. b.Property<double>("SellPrice");
  421. b.Property<int>("StatusId");
  422. b.Property<string>("UnitNumber");
  423. b.Property<string>("WeekNumber");
  424. b.Property<bool>("WeekPlacedForRental");
  425. b.HasKey("Id");
  426. b.HasIndex("AgencyId");
  427. b.HasIndex("AgentId");
  428. b.HasIndex("OwnerId");
  429. b.HasIndex("RegionId");
  430. b.HasIndex("StatusId");
  431. b.ToTable("Weeks");
  432. });
  433. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.UnitConfiguration", b =>
  434. {
  435. b.Property<int>("Id")
  436. .ValueGeneratedOnAdd();
  437. b.Property<int>("Adults");
  438. b.Property<int>("Bedrooms");
  439. b.Property<int>("Children");
  440. b.Property<string>("Code");
  441. b.Property<DateTime>("Created");
  442. b.Property<bool>("IsDeleted");
  443. b.Property<DateTime>("Modified");
  444. b.Property<string>("ModifiedBy");
  445. b.HasKey("Id");
  446. b.HasIndex("Code")
  447. .IsUnique();
  448. b.ToTable("UnitConfigurations");
  449. });
  450. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.UnitConfigurationType", b =>
  451. {
  452. b.Property<int>("Id")
  453. .ValueGeneratedOnAdd();
  454. b.Property<DateTime>("Created");
  455. b.Property<string>("Description");
  456. b.Property<bool>("IsDeleted");
  457. b.Property<DateTime>("Modified");
  458. b.Property<string>("ModifiedBy");
  459. b.Property<int>("UnitConfigurationId");
  460. b.HasKey("Id");
  461. b.HasIndex("UnitConfigurationId");
  462. b.ToTable("UnitConfigurationTypes");
  463. });
  464. modelBuilder.Entity("UnivateProperties_API.Model.Users.Agency", b =>
  465. {
  466. b.Property<int>("Id")
  467. .ValueGeneratedOnAdd();
  468. b.Property<string>("AgencyName");
  469. b.Property<string>("CompanyRegNumber");
  470. b.Property<DateTime>("Created");
  471. b.Property<string>("EAABEFFCNumber");
  472. b.Property<bool>("IsDeleted");
  473. b.Property<DateTime>("Modified");
  474. b.Property<string>("ModifiedBy");
  475. b.HasKey("Id");
  476. b.ToTable("Agencies");
  477. });
  478. modelBuilder.Entity("UnivateProperties_API.Model.Users.Agent", b =>
  479. {
  480. b.Property<int>("Id")
  481. .ValueGeneratedOnAdd();
  482. b.Property<int?>("AgencyId");
  483. b.Property<string>("CellNumber");
  484. b.Property<DateTime>("Created");
  485. b.Property<string>("Email");
  486. b.Property<bool>("IsDeleted");
  487. b.Property<DateTime>("Modified");
  488. b.Property<string>("ModifiedBy");
  489. b.Property<string>("Name");
  490. b.Property<string>("Surname");
  491. b.Property<string>("Telephone");
  492. b.Property<int?>("UserId");
  493. b.HasKey("Id");
  494. b.HasIndex("AgencyId");
  495. b.HasIndex("UserId");
  496. b.ToTable("Agents");
  497. });
  498. modelBuilder.Entity("UnivateProperties_API.Model.Users.Individual", b =>
  499. {
  500. b.Property<int>("Id")
  501. .ValueGeneratedOnAdd();
  502. b.Property<int?>("AddressId");
  503. b.Property<string>("CellNumber");
  504. b.Property<string>("CompanyRegNumber");
  505. b.Property<DateTime>("Created");
  506. b.Property<string>("Email");
  507. b.Property<string>("IdNumber");
  508. b.Property<string>("IncomeTaxNumber");
  509. b.Property<bool>("IsDeleted");
  510. b.Property<string>("MaritalStatus");
  511. b.Property<DateTime>("Modified");
  512. b.Property<string>("ModifiedBy");
  513. b.Property<string>("Name");
  514. b.Property<string>("Surname");
  515. b.Property<string>("Telephone");
  516. b.Property<int?>("UserId");
  517. b.HasKey("Id");
  518. b.HasIndex("AddressId");
  519. b.HasIndex("UserId");
  520. b.HasIndex("Telephone", "CellNumber", "Email")
  521. .IsUnique();
  522. b.ToTable("Individuals");
  523. });
  524. modelBuilder.Entity("UnivateProperties_API.Model.Users.Person", b =>
  525. {
  526. b.Property<int>("Id")
  527. .ValueGeneratedOnAdd();
  528. b.Property<string>("CellNumber");
  529. b.Property<DateTime>("Created");
  530. b.Property<string>("Email");
  531. b.Property<bool>("IsDeleted");
  532. b.Property<DateTime>("Modified");
  533. b.Property<string>("ModifiedBy");
  534. b.Property<string>("Name");
  535. b.Property<string>("Surname");
  536. b.Property<string>("Telephone");
  537. b.Property<int?>("UserId");
  538. b.HasKey("Id");
  539. b.HasIndex("UserId");
  540. b.ToTable("Person");
  541. });
  542. modelBuilder.Entity("UnivateProperties_API.Model.Users.User", b =>
  543. {
  544. b.Property<int>("Id")
  545. .ValueGeneratedOnAdd();
  546. b.Property<DateTime>("Created");
  547. b.Property<bool>("IsDeleted");
  548. b.Property<DateTime>("Modified");
  549. b.Property<string>("ModifiedBy");
  550. b.Property<byte[]>("PasswordHash");
  551. b.Property<byte[]>("PasswordSalt");
  552. b.Property<string>("Role");
  553. b.Property<string>("Token");
  554. b.Property<string>("Username");
  555. b.Property<bool>("Verified");
  556. b.HasKey("Id");
  557. b.HasIndex("Username")
  558. .IsUnique();
  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. }