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.

20200107112926_test.Designer.cs 43KB

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