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.

20191021143440_MappingBank.Designer.cs 37KB

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