API
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

DataContextModelSnapshot.cs 37KB

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