API
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

20191014123820_Location_Templates.Designer.cs 36KB

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