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

DataContextModelSnapshot.cs 39KB

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