API
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

DataContextModelSnapshot.cs 47KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533
  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.4-servicing-10062")
  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.Campaigns.Campaign", b =>
  51. {
  52. b.Property<int>("Id")
  53. .ValueGeneratedOnAdd();
  54. b.Property<string>("Body");
  55. b.Property<DateTime>("Created");
  56. b.Property<DateTime>("EndDate");
  57. b.Property<bool>("IsDeleted");
  58. b.Property<string>("ItemBody");
  59. b.Property<int>("ItemsPerRow");
  60. b.Property<DateTime>("Modified");
  61. b.Property<string>("ModifiedBy");
  62. b.Property<string>("Name");
  63. b.Property<DateTime>("StartDate");
  64. b.Property<string>("Subject");
  65. b.HasKey("Id");
  66. b.ToTable("Campaigns");
  67. });
  68. modelBuilder.Entity("UnivateProperties_API.Model.Campaigns.CampaignItem", b =>
  69. {
  70. b.Property<int>("Id")
  71. .ValueGeneratedOnAdd();
  72. b.Property<int>("CampaignId");
  73. b.Property<DateTime>("Created");
  74. b.Property<string>("Image");
  75. b.Property<bool>("IsDeleted");
  76. b.Property<DateTime>("Modified");
  77. b.Property<string>("ModifiedBy");
  78. b.Property<int>("WeekId");
  79. b.HasKey("Id");
  80. b.HasIndex("CampaignId");
  81. b.HasIndex("WeekId");
  82. b.ToTable("CampaignItems");
  83. });
  84. modelBuilder.Entity("UnivateProperties_API.Model.Campaigns.CampaignItemPlaceHolder", b =>
  85. {
  86. b.Property<int>("Id")
  87. .ValueGeneratedOnAdd();
  88. b.Property<int>("CampaignItemId");
  89. b.Property<DateTime>("Created");
  90. b.Property<bool>("IsDeleted");
  91. b.Property<DateTime>("Modified");
  92. b.Property<string>("ModifiedBy");
  93. b.Property<string>("PlaceHolder");
  94. b.Property<string>("Value");
  95. b.HasKey("Id");
  96. b.HasIndex("CampaignItemId");
  97. b.ToTable("CampaignItemPlaceHolders");
  98. });
  99. modelBuilder.Entity("UnivateProperties_API.Model.Campaigns.CampaignPlaceHolder", b =>
  100. {
  101. b.Property<int>("Id")
  102. .ValueGeneratedOnAdd();
  103. b.Property<string>("BoundTo");
  104. b.Property<string>("BoundToClass");
  105. b.Property<string>("BoundToClassDisplay");
  106. b.Property<int>("CampaignId");
  107. b.Property<DateTime>("Created");
  108. b.Property<string>("Format");
  109. b.Property<bool>("IsDeleted");
  110. b.Property<DateTime>("Modified");
  111. b.Property<string>("ModifiedBy");
  112. b.Property<string>("Name");
  113. b.HasKey("Id");
  114. b.HasIndex("CampaignId");
  115. b.ToTable("CampaignPlaceHolders");
  116. });
  117. modelBuilder.Entity("UnivateProperties_API.Model.Communication.Email", b =>
  118. {
  119. b.Property<int>("Id")
  120. .ValueGeneratedOnAdd();
  121. b.Property<string>("BCC");
  122. b.Property<string>("Body");
  123. b.Property<string>("CC");
  124. b.Property<string>("Comment");
  125. b.Property<DateTime>("Created");
  126. b.Property<bool>("IsBodyHtml");
  127. b.Property<bool>("IsDeleted");
  128. b.Property<DateTime>("Modified");
  129. b.Property<string>("ModifiedBy");
  130. b.Property<int>("SenderId");
  131. b.Property<string>("Subject");
  132. b.Property<string>("To");
  133. b.Property<string>("ToDisplay");
  134. b.HasKey("Id");
  135. b.HasIndex("SenderId");
  136. b.ToTable("Emails");
  137. });
  138. modelBuilder.Entity("UnivateProperties_API.Model.Communication.PlaceHolder", b =>
  139. {
  140. b.Property<int>("Id")
  141. .ValueGeneratedOnAdd();
  142. b.Property<string>("BoundTo");
  143. b.Property<string>("BoundToClass");
  144. b.Property<string>("BoundToClassDisplay");
  145. b.Property<DateTime>("Created");
  146. b.Property<bool>("IsDeleted");
  147. b.Property<DateTime>("Modified");
  148. b.Property<string>("ModifiedBy");
  149. b.Property<string>("Name");
  150. b.Property<int>("TemplateId");
  151. b.HasKey("Id");
  152. b.HasIndex("TemplateId");
  153. b.ToTable("PlaceHolders");
  154. });
  155. modelBuilder.Entity("UnivateProperties_API.Model.Communication.SMTPAccount", b =>
  156. {
  157. b.Property<int>("Id")
  158. .ValueGeneratedOnAdd();
  159. b.Property<string>("Address");
  160. b.Property<DateTime>("Created");
  161. b.Property<bool>("Default");
  162. b.Property<string>("DisplayName");
  163. b.Property<bool>("IsDeleted");
  164. b.Property<DateTime>("Modified");
  165. b.Property<string>("ModifiedBy");
  166. b.Property<int>("SMTPHostId");
  167. b.HasKey("Id");
  168. b.HasIndex("SMTPHostId");
  169. b.ToTable("Accounts");
  170. });
  171. modelBuilder.Entity("UnivateProperties_API.Model.Communication.SMTPHost", b =>
  172. {
  173. b.Property<int>("Id")
  174. .ValueGeneratedOnAdd();
  175. b.Property<DateTime>("Created");
  176. b.Property<string>("Host");
  177. b.Property<bool>("IsDeleted");
  178. b.Property<DateTime>("Modified");
  179. b.Property<string>("ModifiedBy");
  180. b.Property<bool>("NeedsAuthorize");
  181. b.Property<string>("Password");
  182. b.Property<bool>("UseSSL");
  183. b.Property<string>("User");
  184. b.HasKey("Id");
  185. b.ToTable("Hosts");
  186. });
  187. modelBuilder.Entity("UnivateProperties_API.Model.Communication.Template", b =>
  188. {
  189. b.Property<int>("Id")
  190. .ValueGeneratedOnAdd();
  191. b.Property<string>("Body");
  192. b.Property<DateTime>("Created");
  193. b.Property<bool>("IsDeleted");
  194. b.Property<DateTime>("Modified");
  195. b.Property<string>("ModifiedBy");
  196. b.Property<string>("Name");
  197. b.Property<int?>("SenderId");
  198. b.Property<string>("Subject");
  199. b.HasKey("Id");
  200. b.HasIndex("SenderId");
  201. b.ToTable("Templates");
  202. });
  203. modelBuilder.Entity("UnivateProperties_API.Model.Financial.Payment", b =>
  204. {
  205. b.Property<int>("Id")
  206. .ValueGeneratedOnAdd();
  207. b.Property<decimal>("Amount");
  208. b.Property<DateTime>("Created");
  209. b.Property<int>("CreatedById");
  210. b.Property<bool>("IsDeleted");
  211. b.Property<DateTime>("Modified");
  212. b.Property<string>("ModifiedBy");
  213. b.Property<string>("PaymentStatus");
  214. b.Property<string>("PaymentToken");
  215. b.Property<int?>("PropertyId");
  216. b.Property<int?>("TimeshareWeekId");
  217. b.HasKey("Id");
  218. b.HasIndex("CreatedById");
  219. b.HasIndex("PropertyId");
  220. b.HasIndex("TimeshareWeekId");
  221. b.ToTable("Payments");
  222. });
  223. modelBuilder.Entity("UnivateProperties_API.Model.Logging.SearchLog", b =>
  224. {
  225. b.Property<int>("Id")
  226. .ValueGeneratedOnAdd();
  227. b.Property<DateTime>("Created");
  228. b.Property<bool>("IsDeleted");
  229. b.Property<DateTime>("Modified");
  230. b.Property<string>("ModifiedBy");
  231. b.Property<string>("Search");
  232. b.Property<string>("Type");
  233. b.HasKey("Id");
  234. b.ToTable("SearchLogs");
  235. });
  236. modelBuilder.Entity("UnivateProperties_API.Model.Misc.Address", b =>
  237. {
  238. b.Property<int>("Id")
  239. .ValueGeneratedOnAdd();
  240. b.Property<string>("City");
  241. b.Property<DateTime>("Created");
  242. b.Property<bool>("IsDeleted");
  243. b.Property<DateTime>("Modified");
  244. b.Property<string>("ModifiedBy");
  245. b.Property<int?>("OwnerId");
  246. b.Property<string>("PostalCode");
  247. b.Property<string>("Province");
  248. b.Property<string>("Street");
  249. b.Property<string>("StreetNumber");
  250. b.Property<string>("Suburb");
  251. b.HasKey("Id");
  252. b.HasIndex("OwnerId");
  253. b.ToTable("Addresses");
  254. });
  255. modelBuilder.Entity("UnivateProperties_API.Model.Misc.Carousel", b =>
  256. {
  257. b.Property<int>("Id")
  258. .ValueGeneratedOnAdd();
  259. b.Property<DateTime>("Created");
  260. b.Property<string>("Header");
  261. b.Property<string>("Image");
  262. b.Property<bool>("IsDeleted");
  263. b.Property<DateTime>("Modified");
  264. b.Property<string>("ModifiedBy");
  265. b.Property<int>("PropertyId");
  266. b.Property<int>("TimeshareId");
  267. b.HasKey("Id");
  268. b.ToTable("Carousel");
  269. });
  270. modelBuilder.Entity("UnivateProperties_API.Model.Misc.Default", b =>
  271. {
  272. b.Property<string>("Id")
  273. .ValueGeneratedOnAdd();
  274. b.Property<string>("Value");
  275. b.HasKey("Id");
  276. b.ToTable("Defaults");
  277. });
  278. modelBuilder.Entity("UnivateProperties_API.Model.Misc.Location", b =>
  279. {
  280. b.Property<int>("Id")
  281. .ValueGeneratedOnAdd();
  282. b.Property<DateTime>("Created");
  283. b.Property<bool>("IsDeleted");
  284. b.Property<bool>("IsTesting");
  285. b.Property<DateTime>("Modified");
  286. b.Property<string>("ModifiedBy");
  287. b.Property<string>("PropertyImageLocation");
  288. b.HasKey("Id");
  289. b.ToTable("Location");
  290. });
  291. modelBuilder.Entity("UnivateProperties_API.Model.Misc.PlaceHolderFormat", b =>
  292. {
  293. b.Property<int>("Id")
  294. .ValueGeneratedOnAdd();
  295. b.Property<DateTime>("Created");
  296. b.Property<string>("DisplayName");
  297. b.Property<string>("Format");
  298. b.Property<bool>("IsDeleted");
  299. b.Property<DateTime>("Modified");
  300. b.Property<string>("ModifiedBy");
  301. b.HasKey("Id");
  302. b.ToTable("PlaceHolderFormats");
  303. });
  304. modelBuilder.Entity("UnivateProperties_API.Model.ProcessFlow.BidItem", b =>
  305. {
  306. b.Property<int>("Id")
  307. .ValueGeneratedOnAdd();
  308. b.Property<double>("Amount");
  309. b.Property<int?>("BidMakerId");
  310. b.Property<string>("Comment");
  311. b.Property<DateTime>("Created");
  312. b.Property<string>("DeclinedReason");
  313. b.Property<bool>("IsDeleted");
  314. b.Property<DateTime>("Modified");
  315. b.Property<string>("ModifiedBy");
  316. b.Property<int?>("PropertyId");
  317. b.Property<int?>("StatusId");
  318. b.Property<int?>("TimeshareWeekId");
  319. b.HasKey("Id");
  320. b.HasIndex("BidMakerId");
  321. b.HasIndex("PropertyId");
  322. b.HasIndex("StatusId");
  323. b.HasIndex("TimeshareWeekId");
  324. b.ToTable("BidItems");
  325. });
  326. modelBuilder.Entity("UnivateProperties_API.Model.ProcessFlow.ProcessFlow", b =>
  327. {
  328. b.Property<int>("Id")
  329. .ValueGeneratedOnAdd();
  330. b.Property<DateTime>("Created");
  331. b.Property<bool>("IsDeleted");
  332. b.Property<DateTime>("Modified");
  333. b.Property<string>("ModifiedBy");
  334. b.Property<int?>("PropertyID");
  335. b.Property<int>("StatusID");
  336. b.Property<int?>("TimeshareID");
  337. b.HasKey("Id");
  338. b.HasIndex("PropertyID");
  339. b.HasIndex("StatusID");
  340. b.HasIndex("TimeshareID");
  341. b.ToTable("ProcessFlows");
  342. });
  343. modelBuilder.Entity("UnivateProperties_API.Model.Properties.Property", b =>
  344. {
  345. b.Property<int>("Id")
  346. .ValueGeneratedOnAdd();
  347. b.Property<string>("AddressLine1");
  348. b.Property<string>("AddressLine2");
  349. b.Property<string>("AddressLine3");
  350. b.Property<int?>("AgencyId");
  351. b.Property<int?>("AgentId");
  352. b.Property<int>("CityId");
  353. b.Property<DateTime>("Created");
  354. b.Property<DateTime>("DateAvailable");
  355. b.Property<DateTime>("DatePublished");
  356. b.Property<string>("Description");
  357. b.Property<bool>("IsDeleted");
  358. b.Property<bool>("IsSale");
  359. b.Property<DateTime>("Modified");
  360. b.Property<string>("ModifiedBy");
  361. b.Property<decimal>("OperationalCosts");
  362. b.Property<int?>("OwnerId");
  363. b.Property<decimal>("Price");
  364. b.Property<string>("PricePer");
  365. b.Property<string>("PropertyName");
  366. b.Property<int>("PropertyTypeId");
  367. b.Property<int>("ProvinceId");
  368. b.Property<bool>("Published");
  369. b.Property<string>("ShortDescription");
  370. b.Property<DateTime>("StatusDate");
  371. b.Property<int?>("StatusId");
  372. b.Property<int>("SuburbId");
  373. b.Property<string>("Unit");
  374. b.Property<string>("Video");
  375. b.Property<string>("VirtualTour");
  376. b.HasKey("Id");
  377. b.HasIndex("AgencyId");
  378. b.HasIndex("AgentId");
  379. b.HasIndex("CityId");
  380. b.HasIndex("OwnerId");
  381. b.HasIndex("PropertyTypeId");
  382. b.HasIndex("ProvinceId");
  383. b.HasIndex("StatusId");
  384. b.HasIndex("SuburbId");
  385. b.ToTable("Properties");
  386. });
  387. modelBuilder.Entity("UnivateProperties_API.Model.Properties.PropertyImage", b =>
  388. {
  389. b.Property<int>("Id")
  390. .ValueGeneratedOnAdd();
  391. b.Property<DateTime>("Created");
  392. b.Property<string>("Image");
  393. b.Property<bool>("IsDefault");
  394. b.Property<bool>("IsDeleted");
  395. b.Property<DateTime>("Modified");
  396. b.Property<string>("ModifiedBy");
  397. b.Property<int>("PropertyId");
  398. b.HasKey("Id");
  399. b.HasIndex("PropertyId");
  400. b.ToTable("PropertyImages");
  401. });
  402. modelBuilder.Entity("UnivateProperties_API.Model.Properties.PropertyType", b =>
  403. {
  404. b.Property<int>("Id")
  405. .ValueGeneratedOnAdd();
  406. b.Property<DateTime>("Created");
  407. b.Property<string>("Description");
  408. b.Property<bool>("IsDeleted");
  409. b.Property<DateTime>("Modified");
  410. b.Property<string>("ModifiedBy");
  411. b.Property<int>("UsageType");
  412. b.HasKey("Id");
  413. b.ToTable("PropertyTypes");
  414. });
  415. modelBuilder.Entity("UnivateProperties_API.Model.Properties.PropertyUserField", b =>
  416. {
  417. b.Property<int>("Id")
  418. .ValueGeneratedOnAdd();
  419. b.Property<DateTime>("Created");
  420. b.Property<string>("Description");
  421. b.Property<bool>("IsDeleted");
  422. b.Property<DateTime>("Modified");
  423. b.Property<string>("ModifiedBy");
  424. b.Property<int>("PropertyId");
  425. b.Property<int>("UserDefinedFieldId");
  426. b.Property<string>("Value");
  427. b.HasKey("Id");
  428. b.HasIndex("PropertyId");
  429. b.HasIndex("UserDefinedFieldId");
  430. b.ToTable("PropertyUserFields");
  431. });
  432. modelBuilder.Entity("UnivateProperties_API.Model.Properties.UserDefinedField", b =>
  433. {
  434. b.Property<int>("Id")
  435. .ValueGeneratedOnAdd();
  436. b.Property<DateTime>("Created");
  437. b.Property<string>("FieldName");
  438. b.Property<string>("FieldType");
  439. b.Property<int>("GroupId");
  440. b.Property<bool>("IsDeleted");
  441. b.Property<DateTime>("Modified");
  442. b.Property<string>("ModifiedBy");
  443. b.Property<int>("Rank");
  444. b.HasKey("Id");
  445. b.HasIndex("GroupId");
  446. b.ToTable("UserDefinedFields");
  447. });
  448. modelBuilder.Entity("UnivateProperties_API.Model.Properties.UserDefinedGroup", b =>
  449. {
  450. b.Property<int>("Id")
  451. .ValueGeneratedOnAdd();
  452. b.Property<DateTime>("Created");
  453. b.Property<string>("Description");
  454. b.Property<bool>("IsDeleted");
  455. b.Property<DateTime>("Modified");
  456. b.Property<string>("ModifiedBy");
  457. b.Property<int>("Rank");
  458. b.Property<int>("UsageType");
  459. b.HasKey("Id");
  460. b.ToTable("UserDefinedGroups");
  461. });
  462. modelBuilder.Entity("UnivateProperties_API.Model.Region.City", b =>
  463. {
  464. b.Property<int>("Id")
  465. .ValueGeneratedOnAdd();
  466. b.Property<string>("Code");
  467. b.Property<DateTime>("Created");
  468. b.Property<string>("Description");
  469. b.Property<bool>("IsDeleted");
  470. b.Property<DateTime>("Modified");
  471. b.Property<string>("ModifiedBy");
  472. b.Property<int>("ProvinceId");
  473. b.HasKey("Id");
  474. b.HasIndex("ProvinceId");
  475. b.ToTable("Cities");
  476. });
  477. modelBuilder.Entity("UnivateProperties_API.Model.Region.Province", b =>
  478. {
  479. b.Property<int>("Id")
  480. .ValueGeneratedOnAdd();
  481. b.Property<string>("Code");
  482. b.Property<DateTime>("Created");
  483. b.Property<string>("Description");
  484. b.Property<bool>("IsDeleted");
  485. b.Property<DateTime>("Modified");
  486. b.Property<string>("ModifiedBy");
  487. b.HasKey("Id");
  488. b.ToTable("Provinces");
  489. });
  490. modelBuilder.Entity("UnivateProperties_API.Model.Region.Suburb", b =>
  491. {
  492. b.Property<int>("Id")
  493. .ValueGeneratedOnAdd();
  494. b.Property<int>("CityId");
  495. b.Property<DateTime>("Created");
  496. b.Property<string>("Description");
  497. b.Property<bool>("IsDeleted");
  498. b.Property<DateTime>("Modified");
  499. b.Property<string>("ModifiedBy");
  500. b.Property<string>("PostalCode");
  501. b.HasKey("Id");
  502. b.HasIndex("CityId");
  503. b.ToTable("Suburbs");
  504. });
  505. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.Season", b =>
  506. {
  507. b.Property<int>("Id")
  508. .ValueGeneratedOnAdd();
  509. b.Property<DateTime>("Created");
  510. b.Property<bool>("IsDeleted");
  511. b.Property<DateTime>("Modified");
  512. b.Property<string>("ModifiedBy");
  513. b.Property<string>("Name");
  514. b.HasKey("Id");
  515. b.ToTable("Seasons");
  516. });
  517. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.Status", b =>
  518. {
  519. b.Property<int>("Id")
  520. .ValueGeneratedOnAdd();
  521. b.Property<string>("Code");
  522. b.Property<DateTime>("Created");
  523. b.Property<string>("Description");
  524. b.Property<bool>("IsDeleted");
  525. b.Property<DateTime>("Modified");
  526. b.Property<string>("ModifiedBy");
  527. b.Property<int>("StatusType");
  528. b.HasKey("Id");
  529. b.ToTable("Status");
  530. });
  531. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.TimeshareWeek", b =>
  532. {
  533. b.Property<int>("Id")
  534. .ValueGeneratedOnAdd();
  535. b.Property<int?>("AgencyId");
  536. b.Property<bool>("AgentAsRep");
  537. b.Property<double>("AgentCommision");
  538. b.Property<int?>("AgentId");
  539. b.Property<DateTime>("ArrivalDate");
  540. b.Property<string>("BankedWith");
  541. b.Property<int>("Bedrooms");
  542. b.Property<DateTime>("Created");
  543. b.Property<bool>("CurrentYearBanked");
  544. b.Property<DateTime>("DepartureDate");
  545. b.Property<bool>("IsDeleted");
  546. b.Property<bool>("LeviesPaidInFull");
  547. b.Property<double>("LevyAmount");
  548. b.Property<string>("Mandate");
  549. b.Property<int>("MaxSleep");
  550. b.Property<DateTime>("Modified");
  551. b.Property<string>("ModifiedBy");
  552. b.Property<string>("Module");
  553. b.Property<DateTime>("OriginalPurchaseDate");
  554. b.Property<double>("OriginalPurchasePrice");
  555. b.Property<bool>("OtherResort");
  556. b.Property<string>("OtherResortName");
  557. b.Property<int>("OwnerId");
  558. b.Property<bool>("ReferedByAgent");
  559. b.Property<int>("RegionId");
  560. b.Property<string>("ResortCode");
  561. b.Property<string>("ResortName");
  562. b.Property<string>("Season");
  563. b.Property<double>("SellPrice");
  564. b.Property<int>("StatusId");
  565. b.Property<string>("UnitNumber");
  566. b.Property<string>("WeekNumber");
  567. b.Property<bool>("WeekPlacedForRental");
  568. b.HasKey("Id");
  569. b.HasIndex("AgencyId");
  570. b.HasIndex("AgentId");
  571. b.HasIndex("OwnerId");
  572. b.HasIndex("RegionId");
  573. b.HasIndex("StatusId");
  574. b.ToTable("Weeks");
  575. });
  576. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.UnitConfiguration", b =>
  577. {
  578. b.Property<int>("Id")
  579. .ValueGeneratedOnAdd();
  580. b.Property<int>("Adults");
  581. b.Property<int>("Bedrooms");
  582. b.Property<int>("Children");
  583. b.Property<string>("Code");
  584. b.Property<DateTime>("Created");
  585. b.Property<bool>("IsDeleted");
  586. b.Property<DateTime>("Modified");
  587. b.Property<string>("ModifiedBy");
  588. b.HasKey("Id");
  589. b.HasIndex("Code")
  590. .IsUnique();
  591. b.ToTable("UnitConfigurations");
  592. });
  593. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.UnitConfigurationType", b =>
  594. {
  595. b.Property<int>("Id")
  596. .ValueGeneratedOnAdd();
  597. b.Property<DateTime>("Created");
  598. b.Property<string>("Description");
  599. b.Property<bool>("IsDeleted");
  600. b.Property<DateTime>("Modified");
  601. b.Property<string>("ModifiedBy");
  602. b.Property<int>("UnitConfigurationId");
  603. b.HasKey("Id");
  604. b.HasIndex("UnitConfigurationId");
  605. b.ToTable("UnitConfigurationTypes");
  606. });
  607. modelBuilder.Entity("UnivateProperties_API.Model.Users.Agency", b =>
  608. {
  609. b.Property<int>("Id")
  610. .ValueGeneratedOnAdd();
  611. b.Property<string>("AgencyName");
  612. b.Property<string>("CompanyRegNumber");
  613. b.Property<DateTime>("Created");
  614. b.Property<string>("EAABEFFCNumber");
  615. b.Property<bool>("IsDeleted");
  616. b.Property<DateTime>("Modified");
  617. b.Property<string>("ModifiedBy");
  618. b.HasKey("Id");
  619. b.ToTable("Agencies");
  620. });
  621. modelBuilder.Entity("UnivateProperties_API.Model.Users.Agent", b =>
  622. {
  623. b.Property<int>("Id")
  624. .ValueGeneratedOnAdd();
  625. b.Property<int?>("AgencyId");
  626. b.Property<string>("CellNumber");
  627. b.Property<DateTime>("Created");
  628. b.Property<string>("Email");
  629. b.Property<bool>("IsDeleted");
  630. b.Property<DateTime>("Modified");
  631. b.Property<string>("ModifiedBy");
  632. b.Property<string>("Name");
  633. b.Property<string>("Surname");
  634. b.Property<string>("Telephone");
  635. b.Property<int?>("TemplateId");
  636. b.Property<int?>("UserId");
  637. b.HasKey("Id");
  638. b.HasIndex("AgencyId");
  639. b.HasIndex("TemplateId");
  640. b.HasIndex("UserId");
  641. b.ToTable("Agents");
  642. });
  643. modelBuilder.Entity("UnivateProperties_API.Model.Users.Individual", b =>
  644. {
  645. b.Property<int>("Id")
  646. .ValueGeneratedOnAdd();
  647. b.Property<int?>("AddressId");
  648. b.Property<int?>("BankAccountId");
  649. b.Property<string>("CellNumber");
  650. b.Property<string>("CompanyRegNumber");
  651. b.Property<DateTime>("Created");
  652. b.Property<string>("Email");
  653. b.Property<string>("IdNumber");
  654. b.Property<string>("IncomeTaxNumber");
  655. b.Property<bool>("IsDeleted");
  656. b.Property<string>("MaritalStatus");
  657. b.Property<DateTime>("Modified");
  658. b.Property<string>("ModifiedBy");
  659. b.Property<string>("Name");
  660. b.Property<string>("Surname");
  661. b.Property<string>("Telephone");
  662. b.Property<int?>("TemplateId");
  663. b.Property<int?>("UserId");
  664. b.HasKey("Id");
  665. b.HasIndex("AddressId");
  666. b.HasIndex("BankAccountId");
  667. b.HasIndex("TemplateId");
  668. b.HasIndex("UserId");
  669. b.HasIndex("Telephone", "CellNumber", "Email")
  670. .IsUnique();
  671. b.ToTable("Individuals");
  672. });
  673. modelBuilder.Entity("UnivateProperties_API.Model.Users.Person", b =>
  674. {
  675. b.Property<int>("Id")
  676. .ValueGeneratedOnAdd();
  677. b.Property<string>("CellNumber");
  678. b.Property<DateTime>("Created");
  679. b.Property<string>("Email");
  680. b.Property<bool>("IsDeleted");
  681. b.Property<DateTime>("Modified");
  682. b.Property<string>("ModifiedBy");
  683. b.Property<string>("Name");
  684. b.Property<string>("Surname");
  685. b.Property<string>("Telephone");
  686. b.Property<int?>("UserId");
  687. b.HasKey("Id");
  688. b.HasIndex("UserId");
  689. b.ToTable("Person");
  690. });
  691. modelBuilder.Entity("UnivateProperties_API.Model.Users.User", b =>
  692. {
  693. b.Property<int>("Id")
  694. .ValueGeneratedOnAdd();
  695. b.Property<DateTime>("Created");
  696. b.Property<bool>("IsDeleted");
  697. b.Property<DateTime>("Modified");
  698. b.Property<string>("ModifiedBy");
  699. b.Property<byte[]>("PasswordHash");
  700. b.Property<byte[]>("PasswordSalt");
  701. b.Property<string>("Role");
  702. b.Property<string>("Token");
  703. b.Property<string>("Username");
  704. b.Property<bool>("Verified");
  705. b.HasKey("Id");
  706. b.HasIndex("Username")
  707. .IsUnique();
  708. b.ToTable("Users");
  709. });
  710. modelBuilder.Entity("UnivateProperties_API.Model.Banks.BankAccount", b =>
  711. {
  712. b.HasOne("UnivateProperties_API.Model.Banks.Bank", "Bank")
  713. .WithMany()
  714. .HasForeignKey("BankId");
  715. b.HasOne("UnivateProperties_API.Model.Users.Individual", "Owner")
  716. .WithMany()
  717. .HasForeignKey("OwnerId");
  718. });
  719. modelBuilder.Entity("UnivateProperties_API.Model.Campaigns.CampaignItem", b =>
  720. {
  721. b.HasOne("UnivateProperties_API.Model.Campaigns.Campaign", "Campaign")
  722. .WithMany("Items")
  723. .HasForeignKey("CampaignId")
  724. .OnDelete(DeleteBehavior.Cascade);
  725. b.HasOne("UnivateProperties_API.Model.Timeshare.TimeshareWeek", "Week")
  726. .WithMany()
  727. .HasForeignKey("WeekId")
  728. .OnDelete(DeleteBehavior.Cascade);
  729. });
  730. modelBuilder.Entity("UnivateProperties_API.Model.Campaigns.CampaignItemPlaceHolder", b =>
  731. {
  732. b.HasOne("UnivateProperties_API.Model.Campaigns.CampaignItem", "CampaignItem")
  733. .WithMany("CampaignItemPlaceHolder")
  734. .HasForeignKey("CampaignItemId")
  735. .OnDelete(DeleteBehavior.Cascade);
  736. });
  737. modelBuilder.Entity("UnivateProperties_API.Model.Campaigns.CampaignPlaceHolder", b =>
  738. {
  739. b.HasOne("UnivateProperties_API.Model.Campaigns.Campaign", "Campaign")
  740. .WithMany("PlaceHolders")
  741. .HasForeignKey("CampaignId")
  742. .OnDelete(DeleteBehavior.Cascade);
  743. });
  744. modelBuilder.Entity("UnivateProperties_API.Model.Communication.Email", b =>
  745. {
  746. b.HasOne("UnivateProperties_API.Model.Communication.SMTPAccount", "Sender")
  747. .WithMany("Emails")
  748. .HasForeignKey("SenderId")
  749. .OnDelete(DeleteBehavior.Cascade);
  750. });
  751. modelBuilder.Entity("UnivateProperties_API.Model.Communication.PlaceHolder", b =>
  752. {
  753. b.HasOne("UnivateProperties_API.Model.Communication.Template", "Template")
  754. .WithMany("PlaceHolders")
  755. .HasForeignKey("TemplateId")
  756. .OnDelete(DeleteBehavior.Cascade);
  757. });
  758. modelBuilder.Entity("UnivateProperties_API.Model.Communication.SMTPAccount", b =>
  759. {
  760. b.HasOne("UnivateProperties_API.Model.Communication.SMTPHost", "SMTPHost")
  761. .WithMany("SMTPAccounts")
  762. .HasForeignKey("SMTPHostId")
  763. .OnDelete(DeleteBehavior.Cascade);
  764. });
  765. modelBuilder.Entity("UnivateProperties_API.Model.Communication.Template", b =>
  766. {
  767. b.HasOne("UnivateProperties_API.Model.Communication.SMTPAccount", "Sender")
  768. .WithMany("Templates")
  769. .HasForeignKey("SenderId");
  770. });
  771. modelBuilder.Entity("UnivateProperties_API.Model.Financial.Payment", b =>
  772. {
  773. b.HasOne("UnivateProperties_API.Model.Users.User", "CreatedBy")
  774. .WithMany()
  775. .HasForeignKey("CreatedById")
  776. .OnDelete(DeleteBehavior.Cascade);
  777. b.HasOne("UnivateProperties_API.Model.Properties.Property", "Property")
  778. .WithMany()
  779. .HasForeignKey("PropertyId");
  780. b.HasOne("UnivateProperties_API.Model.Timeshare.TimeshareWeek", "TimeshareWeek")
  781. .WithMany()
  782. .HasForeignKey("TimeshareWeekId");
  783. });
  784. modelBuilder.Entity("UnivateProperties_API.Model.Misc.Address", b =>
  785. {
  786. b.HasOne("UnivateProperties_API.Model.Users.Individual", "Owner")
  787. .WithMany()
  788. .HasForeignKey("OwnerId");
  789. });
  790. modelBuilder.Entity("UnivateProperties_API.Model.ProcessFlow.BidItem", b =>
  791. {
  792. b.HasOne("UnivateProperties_API.Model.Users.Individual", "BidMaker")
  793. .WithMany()
  794. .HasForeignKey("BidMakerId");
  795. b.HasOne("UnivateProperties_API.Model.Properties.Property", "Property")
  796. .WithMany("BidItems")
  797. .HasForeignKey("PropertyId");
  798. b.HasOne("UnivateProperties_API.Model.Timeshare.Status", "Status")
  799. .WithMany()
  800. .HasForeignKey("StatusId");
  801. b.HasOne("UnivateProperties_API.Model.Timeshare.TimeshareWeek", "TimeshareWeek")
  802. .WithMany("BidItems")
  803. .HasForeignKey("TimeshareWeekId");
  804. });
  805. modelBuilder.Entity("UnivateProperties_API.Model.ProcessFlow.ProcessFlow", b =>
  806. {
  807. b.HasOne("UnivateProperties_API.Model.Properties.Property", "Property")
  808. .WithMany("ProcessFlows")
  809. .HasForeignKey("PropertyID");
  810. b.HasOne("UnivateProperties_API.Model.Timeshare.Status", "Status")
  811. .WithMany()
  812. .HasForeignKey("StatusID")
  813. .OnDelete(DeleteBehavior.Cascade);
  814. b.HasOne("UnivateProperties_API.Model.Timeshare.TimeshareWeek", "Timeshare")
  815. .WithMany("ProcessFlows")
  816. .HasForeignKey("TimeshareID");
  817. });
  818. modelBuilder.Entity("UnivateProperties_API.Model.Properties.Property", b =>
  819. {
  820. b.HasOne("UnivateProperties_API.Model.Users.Agency", "Agency")
  821. .WithMany("Properties")
  822. .HasForeignKey("AgencyId");
  823. b.HasOne("UnivateProperties_API.Model.Users.Agent", "Agent")
  824. .WithMany("Properties")
  825. .HasForeignKey("AgentId");
  826. b.HasOne("UnivateProperties_API.Model.Region.City", "City")
  827. .WithMany()
  828. .HasForeignKey("CityId")
  829. .OnDelete(DeleteBehavior.Cascade);
  830. b.HasOne("UnivateProperties_API.Model.Users.Individual", "Owner")
  831. .WithMany("Properties")
  832. .HasForeignKey("OwnerId");
  833. b.HasOne("UnivateProperties_API.Model.Properties.PropertyType", "PropertyType")
  834. .WithMany()
  835. .HasForeignKey("PropertyTypeId")
  836. .OnDelete(DeleteBehavior.Cascade);
  837. b.HasOne("UnivateProperties_API.Model.Region.Province", "Province")
  838. .WithMany()
  839. .HasForeignKey("ProvinceId")
  840. .OnDelete(DeleteBehavior.Cascade);
  841. b.HasOne("UnivateProperties_API.Model.Timeshare.Status", "Status")
  842. .WithMany()
  843. .HasForeignKey("StatusId");
  844. b.HasOne("UnivateProperties_API.Model.Region.Suburb", "Suburb")
  845. .WithMany()
  846. .HasForeignKey("SuburbId")
  847. .OnDelete(DeleteBehavior.Cascade);
  848. });
  849. modelBuilder.Entity("UnivateProperties_API.Model.Properties.PropertyImage", b =>
  850. {
  851. b.HasOne("UnivateProperties_API.Model.Properties.Property", "Property")
  852. .WithMany("PropertyImages")
  853. .HasForeignKey("PropertyId")
  854. .OnDelete(DeleteBehavior.Cascade);
  855. });
  856. modelBuilder.Entity("UnivateProperties_API.Model.Properties.PropertyUserField", b =>
  857. {
  858. b.HasOne("UnivateProperties_API.Model.Properties.Property", "Property")
  859. .WithMany("PropertyUserFields")
  860. .HasForeignKey("PropertyId")
  861. .OnDelete(DeleteBehavior.Cascade);
  862. b.HasOne("UnivateProperties_API.Model.Properties.UserDefinedField", "UserDefinedField")
  863. .WithMany()
  864. .HasForeignKey("UserDefinedFieldId")
  865. .OnDelete(DeleteBehavior.Cascade);
  866. });
  867. modelBuilder.Entity("UnivateProperties_API.Model.Properties.UserDefinedField", b =>
  868. {
  869. b.HasOne("UnivateProperties_API.Model.Properties.UserDefinedGroup", "Group")
  870. .WithMany("Fields")
  871. .HasForeignKey("GroupId")
  872. .OnDelete(DeleteBehavior.Cascade);
  873. });
  874. modelBuilder.Entity("UnivateProperties_API.Model.Region.City", b =>
  875. {
  876. b.HasOne("UnivateProperties_API.Model.Region.Province", "Province")
  877. .WithMany()
  878. .HasForeignKey("ProvinceId")
  879. .OnDelete(DeleteBehavior.Cascade);
  880. });
  881. modelBuilder.Entity("UnivateProperties_API.Model.Region.Suburb", b =>
  882. {
  883. b.HasOne("UnivateProperties_API.Model.Region.City", "City")
  884. .WithMany()
  885. .HasForeignKey("CityId")
  886. .OnDelete(DeleteBehavior.Cascade);
  887. });
  888. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.TimeshareWeek", b =>
  889. {
  890. b.HasOne("UnivateProperties_API.Model.Users.Agency", "Agency")
  891. .WithMany()
  892. .HasForeignKey("AgencyId");
  893. b.HasOne("UnivateProperties_API.Model.Users.Agent", "Agent")
  894. .WithMany()
  895. .HasForeignKey("AgentId");
  896. b.HasOne("UnivateProperties_API.Model.Users.Individual", "Owner")
  897. .WithMany()
  898. .HasForeignKey("OwnerId")
  899. .OnDelete(DeleteBehavior.Cascade);
  900. b.HasOne("UnivateProperties_API.Model.Region.Province", "Region")
  901. .WithMany()
  902. .HasForeignKey("RegionId")
  903. .OnDelete(DeleteBehavior.Cascade);
  904. b.HasOne("UnivateProperties_API.Model.Timeshare.Status", "Status")
  905. .WithMany()
  906. .HasForeignKey("StatusId")
  907. .OnDelete(DeleteBehavior.Cascade);
  908. });
  909. modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.UnitConfigurationType", b =>
  910. {
  911. b.HasOne("UnivateProperties_API.Model.Timeshare.UnitConfiguration", "UnitConfiguration")
  912. .WithMany("Types")
  913. .HasForeignKey("UnitConfigurationId")
  914. .OnDelete(DeleteBehavior.Cascade);
  915. });
  916. modelBuilder.Entity("UnivateProperties_API.Model.Users.Agent", b =>
  917. {
  918. b.HasOne("UnivateProperties_API.Model.Users.Agency", "Agency")
  919. .WithMany("Agents")
  920. .HasForeignKey("AgencyId");
  921. b.HasOne("UnivateProperties_API.Model.Communication.Template")
  922. .WithMany("AgentBCC")
  923. .HasForeignKey("TemplateId");
  924. b.HasOne("UnivateProperties_API.Model.Users.User", "User")
  925. .WithMany()
  926. .HasForeignKey("UserId");
  927. });
  928. modelBuilder.Entity("UnivateProperties_API.Model.Users.Individual", b =>
  929. {
  930. b.HasOne("UnivateProperties_API.Model.Misc.Address", "Address")
  931. .WithMany()
  932. .HasForeignKey("AddressId");
  933. b.HasOne("UnivateProperties_API.Model.Banks.BankAccount", "BankAccount")
  934. .WithMany()
  935. .HasForeignKey("BankAccountId");
  936. b.HasOne("UnivateProperties_API.Model.Communication.Template")
  937. .WithMany("IndividualBCC")
  938. .HasForeignKey("TemplateId");
  939. b.HasOne("UnivateProperties_API.Model.Users.User", "User")
  940. .WithMany()
  941. .HasForeignKey("UserId");
  942. });
  943. modelBuilder.Entity("UnivateProperties_API.Model.Users.Person", b =>
  944. {
  945. b.HasOne("UnivateProperties_API.Model.Users.User", "User")
  946. .WithMany()
  947. .HasForeignKey("UserId");
  948. });
  949. #pragma warning restore 612, 618
  950. }
  951. }
  952. }