Bladeren bron

Changed DB to SQL - As published to QA

master
George Williams 4 jaren geleden
bovenliggende
commit
8e26f883ba
52 gewijzigde bestanden met toevoegingen van 1930 en 26482 verwijderingen
  1. 1
    1
      UnivateProperties_API/Context/DataContext.cs
  2. 0
    771
      UnivateProperties_API/Migrations/20190904110840_Initial.Designer.cs
  3. 0
    741
      UnivateProperties_API/Migrations/20190904110840_Initial.cs
  4. 0
    773
      UnivateProperties_API/Migrations/20190904111234_AgentAsRep.Designer.cs
  5. 0
    23
      UnivateProperties_API/Migrations/20190904111234_AgentAsRep.cs
  6. 0
    775
      UnivateProperties_API/Migrations/20190905084739_AddedSellPrice.Designer.cs
  7. 0
    23
      UnivateProperties_API/Migrations/20190905084739_AddedSellPrice.cs
  8. 0
    951
      UnivateProperties_API/Migrations/20190905133540_BanksAddresses.Designer.cs
  9. 0
    416
      UnivateProperties_API/Migrations/20190905133540_BanksAddresses.cs
  10. 0
    1008
      UnivateProperties_API/Migrations/20190906105051_Process.Designer.cs
  11. 0
    84
      UnivateProperties_API/Migrations/20190906105051_Process.cs
  12. 0
    1010
      UnivateProperties_API/Migrations/20190909074136_UnitNumber.Designer.cs
  13. 0
    22
      UnivateProperties_API/Migrations/20190909074136_UnitNumber.cs
  14. 0
    1030
      UnivateProperties_API/Migrations/20190910092816_GeorgeNew.Designer.cs
  15. 0
    53
      UnivateProperties_API/Migrations/20190910092816_GeorgeNew.cs
  16. 0
    1121
      UnivateProperties_API/Migrations/20191003082255_IsDeleted.Designer.cs
  17. 0
    321
      UnivateProperties_API/Migrations/20191003082255_IsDeleted.cs
  18. 0
    1197
      UnivateProperties_API/Migrations/20191014123718_Location_Templates2.Designer.cs
  19. 0
    1199
      UnivateProperties_API/Migrations/20191014123820_Location_Templates.Designer.cs
  20. 0
    102
      UnivateProperties_API/Migrations/20191014123820_Location_Templates.cs
  21. 0
    1211
      UnivateProperties_API/Migrations/20191014135639_PlaceHolder.Designer.cs
  22. 0
    71
      UnivateProperties_API/Migrations/20191014135639_PlaceHolder.cs
  23. 0
    1215
      UnivateProperties_API/Migrations/20191018124608_NewPropertyProperties.Designer.cs
  24. 0
    31
      UnivateProperties_API/Migrations/20191018124608_NewPropertyProperties.cs
  25. 0
    1233
      UnivateProperties_API/Migrations/20191021143440_MappingBank.Designer.cs
  26. 0
    128
      UnivateProperties_API/Migrations/20191021143440_MappingBank.cs
  27. 0
    1239
      UnivateProperties_API/Migrations/20191022055635_AddedWeekProps.Designer.cs
  28. 0
    41
      UnivateProperties_API/Migrations/20191022055635_AddedWeekProps.cs
  29. 0
    1241
      UnivateProperties_API/Migrations/20191031084836_Carousel Stuff.Designer.cs
  30. 0
    38
      UnivateProperties_API/Migrations/20191031084836_Carousel Stuff.cs
  31. 0
    1294
      UnivateProperties_API/Migrations/20191112124547_templateMod.Designer.cs
  32. 0
    113
      UnivateProperties_API/Migrations/20191112124547_templateMod.cs
  33. 0
    549
      UnivateProperties_API/Migrations/20200107112926_test.cs
  34. 0
    1298
      UnivateProperties_API/Migrations/20200121092345_MissingColumns.Designer.cs
  35. 0
    569
      UnivateProperties_API/Migrations/20200121092345_MissingColumns.cs
  36. 0
    1339
      UnivateProperties_API/Migrations/20200121103350_PaymentsTable.Designer.cs
  37. 0
    60
      UnivateProperties_API/Migrations/20200121103350_PaymentsTable.cs
  38. 0
    1350
      UnivateProperties_API/Migrations/20200122063527_ExtraPaymentFields.Designer.cs
  39. 0
    53
      UnivateProperties_API/Migrations/20200122063527_ExtraPaymentFields.cs
  40. 0
    1352
      UnivateProperties_API/Migrations/20200122131033_DatePublishedToPorp.Designer.cs
  41. 0
    24
      UnivateProperties_API/Migrations/20200122131033_DatePublishedToPorp.cs
  42. 0
    200
      UnivateProperties_API/Migrations/20200624064952_publish-2020-06-24.cs
  43. 88
    81
      UnivateProperties_API/Migrations/20200625115738_SQL_DB_Create.Designer.cs
  44. 1482
    0
      UnivateProperties_API/Migrations/20200625115738_SQL_DB_Create.cs
  45. 250
    37
      UnivateProperties_API/Migrations/20200625173633_Update-Database.Designer.cs
  46. 1
    1
      UnivateProperties_API/Migrations/20200625173633_Update-Database.cs
  47. 86
    79
      UnivateProperties_API/Migrations/DataContextModelSnapshot.cs
  48. 12
    7
      UnivateProperties_API/Model/Properties/Property.cs
  49. 3
    1
      UnivateProperties_API/Program.cs
  50. 1
    1
      UnivateProperties_API/Startup.cs
  51. 4
    3
      UnivateProperties_API/UnivateProperties_API.csproj
  52. 2
    2
      UnivateProperties_API/appsettings.json

+ 1
- 1
UnivateProperties_API/Context/DataContext.cs Bestand weergeven

@@ -166,7 +166,7 @@ namespace UnivateProperties_API.Context
166 166
             modelBuilder.Entity<User>()
167 167
             .HasIndex(u => u.Username)
168 168
             .IsUnique(true);
169
-           
169
+
170 170
             modelBuilder.Entity<Email>().HasQueryFilter(m => EF.Property<bool>(m, "IsDeleted") == false);
171 171
             modelBuilder.Entity<SMTPAccount>().HasQueryFilter(m => EF.Property<bool>(m, "IsDeleted") == false);
172 172
             modelBuilder.Entity<SMTPHost>().HasQueryFilter(m => EF.Property<bool>(m, "IsDeleted") == false);

+ 0
- 771
UnivateProperties_API/Migrations/20190904110840_Initial.Designer.cs Bestand weergeven

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

+ 0
- 741
UnivateProperties_API/Migrations/20190904110840_Initial.cs Bestand weergeven

@@ -1,741 +0,0 @@
1
-using System;
2
-using Microsoft.EntityFrameworkCore.Migrations;
3
-using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
4
-
5
-namespace UnivateProperties_API.Migrations
6
-{
7
-    public partial class Initial : Migration
8
-    {
9
-        protected override void Up(MigrationBuilder migrationBuilder)
10
-        {
11
-            migrationBuilder.CreateTable(
12
-                name: "Agencies",
13
-                columns: table => new
14
-                {
15
-                    Id = table.Column<int>(nullable: false)
16
-                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
17
-                    Created = table.Column<DateTime>(nullable: false),
18
-                    Modified = table.Column<DateTime>(nullable: false),
19
-                    ModifiedBy = table.Column<string>(nullable: true),
20
-                    AgencyName = table.Column<string>(nullable: true),
21
-                    EAABEFFCNumber = table.Column<string>(nullable: true),
22
-                    CompanyRegNumber = table.Column<string>(nullable: true)
23
-                },
24
-                constraints: table =>
25
-                {
26
-                    table.PrimaryKey("PK_Agencies", x => x.Id);
27
-                });
28
-
29
-            migrationBuilder.CreateTable(
30
-                name: "Hosts",
31
-                columns: table => new
32
-                {
33
-                    Id = table.Column<int>(nullable: false)
34
-                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
35
-                    Created = table.Column<DateTime>(nullable: false),
36
-                    Modified = table.Column<DateTime>(nullable: false),
37
-                    ModifiedBy = table.Column<string>(nullable: true),
38
-                    Host = table.Column<string>(nullable: true),
39
-                    NeedsAuthorize = table.Column<bool>(nullable: false),
40
-                    User = table.Column<string>(nullable: true),
41
-                    Password = table.Column<string>(nullable: true),
42
-                    UseSSL = table.Column<bool>(nullable: false)
43
-                },
44
-                constraints: table =>
45
-                {
46
-                    table.PrimaryKey("PK_Hosts", x => x.Id);
47
-                });
48
-
49
-            migrationBuilder.CreateTable(
50
-                name: "PropertyTypes",
51
-                columns: table => new
52
-                {
53
-                    Id = table.Column<int>(nullable: false)
54
-                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
55
-                    Created = table.Column<DateTime>(nullable: false),
56
-                    Modified = table.Column<DateTime>(nullable: false),
57
-                    ModifiedBy = table.Column<string>(nullable: true),
58
-                    Description = table.Column<string>(nullable: true),
59
-                    UsageType = table.Column<int>(nullable: false)
60
-                },
61
-                constraints: table =>
62
-                {
63
-                    table.PrimaryKey("PK_PropertyTypes", x => x.Id);
64
-                });
65
-
66
-            migrationBuilder.CreateTable(
67
-                name: "Provinces",
68
-                columns: table => new
69
-                {
70
-                    Id = table.Column<int>(nullable: false)
71
-                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
72
-                    Created = table.Column<DateTime>(nullable: false),
73
-                    Modified = table.Column<DateTime>(nullable: false),
74
-                    ModifiedBy = table.Column<string>(nullable: true),
75
-                    Description = table.Column<string>(nullable: true),
76
-                    Code = table.Column<string>(nullable: true)
77
-                },
78
-                constraints: table =>
79
-                {
80
-                    table.PrimaryKey("PK_Provinces", x => x.Id);
81
-                });
82
-
83
-            migrationBuilder.CreateTable(
84
-                name: "Seasons",
85
-                columns: table => new
86
-                {
87
-                    Id = table.Column<int>(nullable: false)
88
-                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
89
-                    Created = table.Column<DateTime>(nullable: false),
90
-                    Modified = table.Column<DateTime>(nullable: false),
91
-                    ModifiedBy = table.Column<string>(nullable: true),
92
-                    Name = table.Column<string>(nullable: true)
93
-                },
94
-                constraints: table =>
95
-                {
96
-                    table.PrimaryKey("PK_Seasons", x => x.Id);
97
-                });
98
-
99
-            migrationBuilder.CreateTable(
100
-                name: "Status",
101
-                columns: table => new
102
-                {
103
-                    Id = table.Column<int>(nullable: false)
104
-                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
105
-                    Created = table.Column<DateTime>(nullable: false),
106
-                    Modified = table.Column<DateTime>(nullable: false),
107
-                    ModifiedBy = table.Column<string>(nullable: true),
108
-                    Code = table.Column<string>(nullable: true),
109
-                    Description = table.Column<string>(nullable: true),
110
-                    StatusType = table.Column<int>(nullable: false)
111
-                },
112
-                constraints: table =>
113
-                {
114
-                    table.PrimaryKey("PK_Status", x => x.Id);
115
-                });
116
-
117
-            migrationBuilder.CreateTable(
118
-                name: "UnitConfigurations",
119
-                columns: table => new
120
-                {
121
-                    Id = table.Column<int>(nullable: false)
122
-                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
123
-                    Created = table.Column<DateTime>(nullable: false),
124
-                    Modified = table.Column<DateTime>(nullable: false),
125
-                    ModifiedBy = table.Column<string>(nullable: true),
126
-                    Code = table.Column<string>(nullable: true),
127
-                    Bedrooms = table.Column<int>(nullable: false),
128
-                    Adults = table.Column<int>(nullable: false),
129
-                    Children = table.Column<int>(nullable: false)
130
-                },
131
-                constraints: table =>
132
-                {
133
-                    table.PrimaryKey("PK_UnitConfigurations", x => x.Id);
134
-                });
135
-
136
-            migrationBuilder.CreateTable(
137
-                name: "UserDefinedGroups",
138
-                columns: table => new
139
-                {
140
-                    Id = table.Column<int>(nullable: false)
141
-                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
142
-                    Created = table.Column<DateTime>(nullable: false),
143
-                    Modified = table.Column<DateTime>(nullable: false),
144
-                    ModifiedBy = table.Column<string>(nullable: true),
145
-                    Description = table.Column<string>(nullable: true),
146
-                    UsageType = table.Column<int>(nullable: false),
147
-                    Rank = table.Column<int>(nullable: false)
148
-                },
149
-                constraints: table =>
150
-                {
151
-                    table.PrimaryKey("PK_UserDefinedGroups", x => x.Id);
152
-                });
153
-
154
-            migrationBuilder.CreateTable(
155
-                name: "Users",
156
-                columns: table => new
157
-                {
158
-                    Id = table.Column<int>(nullable: false)
159
-                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
160
-                    Created = table.Column<DateTime>(nullable: false),
161
-                    Modified = table.Column<DateTime>(nullable: false),
162
-                    ModifiedBy = table.Column<string>(nullable: true),
163
-                    Username = table.Column<string>(nullable: true),
164
-                    Role = table.Column<string>(nullable: true),
165
-                    PasswordHash = table.Column<byte[]>(nullable: true),
166
-                    PasswordSalt = table.Column<byte[]>(nullable: true),
167
-                    Verified = table.Column<bool>(nullable: false),
168
-                    Token = table.Column<string>(nullable: true)
169
-                },
170
-                constraints: table =>
171
-                {
172
-                    table.PrimaryKey("PK_Users", x => x.Id);
173
-                });
174
-
175
-            migrationBuilder.CreateTable(
176
-                name: "Accounts",
177
-                columns: table => new
178
-                {
179
-                    Id = table.Column<int>(nullable: false)
180
-                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
181
-                    Created = table.Column<DateTime>(nullable: false),
182
-                    Modified = table.Column<DateTime>(nullable: false),
183
-                    ModifiedBy = table.Column<string>(nullable: true),
184
-                    Address = table.Column<string>(nullable: true),
185
-                    DisplayName = table.Column<string>(nullable: true),
186
-                    SMTPHostId = table.Column<int>(nullable: false)
187
-                },
188
-                constraints: table =>
189
-                {
190
-                    table.PrimaryKey("PK_Accounts", x => x.Id);
191
-                    table.ForeignKey(
192
-                        name: "FK_Accounts_Hosts_SMTPHostId",
193
-                        column: x => x.SMTPHostId,
194
-                        principalTable: "Hosts",
195
-                        principalColumn: "Id",
196
-                        onDelete: ReferentialAction.Cascade);
197
-                });
198
-
199
-            migrationBuilder.CreateTable(
200
-                name: "Cities",
201
-                columns: table => new
202
-                {
203
-                    Id = table.Column<int>(nullable: false)
204
-                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
205
-                    Created = table.Column<DateTime>(nullable: false),
206
-                    Modified = table.Column<DateTime>(nullable: false),
207
-                    ModifiedBy = table.Column<string>(nullable: true),
208
-                    ProvinceId = table.Column<int>(nullable: false),
209
-                    Description = table.Column<string>(nullable: true),
210
-                    Code = table.Column<string>(nullable: true)
211
-                },
212
-                constraints: table =>
213
-                {
214
-                    table.PrimaryKey("PK_Cities", x => x.Id);
215
-                    table.ForeignKey(
216
-                        name: "FK_Cities_Provinces_ProvinceId",
217
-                        column: x => x.ProvinceId,
218
-                        principalTable: "Provinces",
219
-                        principalColumn: "Id",
220
-                        onDelete: ReferentialAction.Cascade);
221
-                });
222
-
223
-            migrationBuilder.CreateTable(
224
-                name: "UnitConfigurationTypes",
225
-                columns: table => new
226
-                {
227
-                    Id = table.Column<int>(nullable: false)
228
-                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
229
-                    Created = table.Column<DateTime>(nullable: false),
230
-                    Modified = table.Column<DateTime>(nullable: false),
231
-                    ModifiedBy = table.Column<string>(nullable: true),
232
-                    Description = table.Column<string>(nullable: true),
233
-                    UnitConfigurationId = table.Column<int>(nullable: false)
234
-                },
235
-                constraints: table =>
236
-                {
237
-                    table.PrimaryKey("PK_UnitConfigurationTypes", x => x.Id);
238
-                    table.ForeignKey(
239
-                        name: "FK_UnitConfigurationTypes_UnitConfigurations_UnitConfiguration~",
240
-                        column: x => x.UnitConfigurationId,
241
-                        principalTable: "UnitConfigurations",
242
-                        principalColumn: "Id",
243
-                        onDelete: ReferentialAction.Cascade);
244
-                });
245
-
246
-            migrationBuilder.CreateTable(
247
-                name: "UserDefinedFields",
248
-                columns: table => new
249
-                {
250
-                    Id = table.Column<int>(nullable: false)
251
-                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
252
-                    Created = table.Column<DateTime>(nullable: false),
253
-                    Modified = table.Column<DateTime>(nullable: false),
254
-                    ModifiedBy = table.Column<string>(nullable: true),
255
-                    GroupId = table.Column<int>(nullable: false),
256
-                    FieldName = table.Column<string>(nullable: true),
257
-                    FieldType = table.Column<string>(nullable: true),
258
-                    Rank = table.Column<int>(nullable: false)
259
-                },
260
-                constraints: table =>
261
-                {
262
-                    table.PrimaryKey("PK_UserDefinedFields", x => x.Id);
263
-                    table.ForeignKey(
264
-                        name: "FK_UserDefinedFields_UserDefinedGroups_GroupId",
265
-                        column: x => x.GroupId,
266
-                        principalTable: "UserDefinedGroups",
267
-                        principalColumn: "Id",
268
-                        onDelete: ReferentialAction.Cascade);
269
-                });
270
-
271
-            migrationBuilder.CreateTable(
272
-                name: "Agents",
273
-                columns: table => new
274
-                {
275
-                    Id = table.Column<int>(nullable: false)
276
-                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
277
-                    Created = table.Column<DateTime>(nullable: false),
278
-                    Modified = table.Column<DateTime>(nullable: false),
279
-                    ModifiedBy = table.Column<string>(nullable: true),
280
-                    UserId = table.Column<int>(nullable: false),
281
-                    Name = table.Column<string>(nullable: true),
282
-                    Surname = table.Column<string>(nullable: true),
283
-                    Email = table.Column<string>(nullable: true),
284
-                    Telephone = table.Column<string>(nullable: true),
285
-                    CellNumber = table.Column<string>(nullable: true),
286
-                    AgencyId = table.Column<int>(nullable: true)
287
-                },
288
-                constraints: table =>
289
-                {
290
-                    table.PrimaryKey("PK_Agents", x => x.Id);
291
-                    table.ForeignKey(
292
-                        name: "FK_Agents_Agencies_AgencyId",
293
-                        column: x => x.AgencyId,
294
-                        principalTable: "Agencies",
295
-                        principalColumn: "Id",
296
-                        onDelete: ReferentialAction.Restrict);
297
-                    table.ForeignKey(
298
-                        name: "FK_Agents_Users_UserId",
299
-                        column: x => x.UserId,
300
-                        principalTable: "Users",
301
-                        principalColumn: "Id",
302
-                        onDelete: ReferentialAction.Cascade);
303
-                });
304
-
305
-            migrationBuilder.CreateTable(
306
-                name: "Individuals",
307
-                columns: table => new
308
-                {
309
-                    Id = table.Column<int>(nullable: false)
310
-                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
311
-                    Created = table.Column<DateTime>(nullable: false),
312
-                    Modified = table.Column<DateTime>(nullable: false),
313
-                    ModifiedBy = table.Column<string>(nullable: true),
314
-                    UserId = table.Column<int>(nullable: false),
315
-                    Name = table.Column<string>(nullable: true),
316
-                    Surname = table.Column<string>(nullable: true),
317
-                    Email = table.Column<string>(nullable: true),
318
-                    Telephone = table.Column<string>(nullable: true),
319
-                    CellNumber = table.Column<string>(nullable: true)
320
-                },
321
-                constraints: table =>
322
-                {
323
-                    table.PrimaryKey("PK_Individuals", x => x.Id);
324
-                    table.ForeignKey(
325
-                        name: "FK_Individuals_Users_UserId",
326
-                        column: x => x.UserId,
327
-                        principalTable: "Users",
328
-                        principalColumn: "Id",
329
-                        onDelete: ReferentialAction.Cascade);
330
-                });
331
-
332
-            migrationBuilder.CreateTable(
333
-                name: "Emails",
334
-                columns: table => new
335
-                {
336
-                    Id = table.Column<int>(nullable: false)
337
-                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
338
-                    Created = table.Column<DateTime>(nullable: false),
339
-                    Modified = table.Column<DateTime>(nullable: false),
340
-                    ModifiedBy = table.Column<string>(nullable: true),
341
-                    SenderId = table.Column<int>(nullable: false),
342
-                    Comment = table.Column<string>(nullable: true),
343
-                    Subject = table.Column<string>(nullable: true),
344
-                    IsBodyHtml = table.Column<bool>(nullable: false),
345
-                    CC = table.Column<string>(nullable: true),
346
-                    BCC = table.Column<string>(nullable: true),
347
-                    Body = table.Column<string>(nullable: true),
348
-                    To = table.Column<string>(nullable: true),
349
-                    ToDisplay = table.Column<string>(nullable: true)
350
-                },
351
-                constraints: table =>
352
-                {
353
-                    table.PrimaryKey("PK_Emails", x => x.Id);
354
-                    table.ForeignKey(
355
-                        name: "FK_Emails_Accounts_SenderId",
356
-                        column: x => x.SenderId,
357
-                        principalTable: "Accounts",
358
-                        principalColumn: "Id",
359
-                        onDelete: ReferentialAction.Cascade);
360
-                });
361
-
362
-            migrationBuilder.CreateTable(
363
-                name: "Suburbs",
364
-                columns: table => new
365
-                {
366
-                    Id = table.Column<int>(nullable: false)
367
-                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
368
-                    Created = table.Column<DateTime>(nullable: false),
369
-                    Modified = table.Column<DateTime>(nullable: false),
370
-                    ModifiedBy = table.Column<string>(nullable: true),
371
-                    CityId = table.Column<int>(nullable: false),
372
-                    Description = table.Column<string>(nullable: true),
373
-                    PostalCode = table.Column<string>(nullable: true)
374
-                },
375
-                constraints: table =>
376
-                {
377
-                    table.PrimaryKey("PK_Suburbs", x => x.Id);
378
-                    table.ForeignKey(
379
-                        name: "FK_Suburbs_Cities_CityId",
380
-                        column: x => x.CityId,
381
-                        principalTable: "Cities",
382
-                        principalColumn: "Id",
383
-                        onDelete: ReferentialAction.Cascade);
384
-                });
385
-
386
-            migrationBuilder.CreateTable(
387
-                name: "Weeks",
388
-                columns: table => new
389
-                {
390
-                    Id = table.Column<int>(nullable: false)
391
-                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
392
-                    Created = table.Column<DateTime>(nullable: false),
393
-                    Modified = table.Column<DateTime>(nullable: false),
394
-                    ModifiedBy = table.Column<string>(nullable: true),
395
-                    ReferedByAgent = table.Column<bool>(nullable: false),
396
-                    AgentId = table.Column<int>(nullable: true),
397
-                    AgencyId = table.Column<int>(nullable: true),
398
-                    OwnerId = table.Column<int>(nullable: false),
399
-                    OtherResort = table.Column<bool>(nullable: false),
400
-                    ResortCode = table.Column<string>(nullable: true),
401
-                    ResortName = table.Column<string>(nullable: true),
402
-                    RegionId = table.Column<int>(nullable: false),
403
-                    Season = table.Column<string>(nullable: true),
404
-                    Module = table.Column<string>(nullable: true),
405
-                    Bedrooms = table.Column<int>(nullable: false),
406
-                    MaxSleep = table.Column<int>(nullable: false),
407
-                    WeekNumber = table.Column<string>(nullable: true),
408
-                    LevyAmount = table.Column<double>(nullable: false),
409
-                    CurrentYearBanked = table.Column<bool>(nullable: false),
410
-                    BankedWith = table.Column<string>(nullable: true),
411
-                    LeviesPaidInFull = table.Column<bool>(nullable: false),
412
-                    WeekPlacedForRental = table.Column<bool>(nullable: false),
413
-                    OriginalPurchasePrice = table.Column<double>(nullable: false),
414
-                    OriginalPurchaseDate = table.Column<DateTime>(nullable: false),
415
-                    ArrivalDate = table.Column<DateTime>(nullable: false),
416
-                    DepartureDate = table.Column<DateTime>(nullable: false),
417
-                    StatusId = table.Column<int>(nullable: false)
418
-                },
419
-                constraints: table =>
420
-                {
421
-                    table.PrimaryKey("PK_Weeks", x => x.Id);
422
-                    table.ForeignKey(
423
-                        name: "FK_Weeks_Agencies_AgencyId",
424
-                        column: x => x.AgencyId,
425
-                        principalTable: "Agencies",
426
-                        principalColumn: "Id",
427
-                        onDelete: ReferentialAction.Restrict);
428
-                    table.ForeignKey(
429
-                        name: "FK_Weeks_Agents_AgentId",
430
-                        column: x => x.AgentId,
431
-                        principalTable: "Agents",
432
-                        principalColumn: "Id",
433
-                        onDelete: ReferentialAction.Restrict);
434
-                    table.ForeignKey(
435
-                        name: "FK_Weeks_Individuals_OwnerId",
436
-                        column: x => x.OwnerId,
437
-                        principalTable: "Individuals",
438
-                        principalColumn: "Id",
439
-                        onDelete: ReferentialAction.Cascade);
440
-                    table.ForeignKey(
441
-                        name: "FK_Weeks_Provinces_RegionId",
442
-                        column: x => x.RegionId,
443
-                        principalTable: "Provinces",
444
-                        principalColumn: "Id",
445
-                        onDelete: ReferentialAction.Cascade);
446
-                    table.ForeignKey(
447
-                        name: "FK_Weeks_Status_StatusId",
448
-                        column: x => x.StatusId,
449
-                        principalTable: "Status",
450
-                        principalColumn: "Id",
451
-                        onDelete: ReferentialAction.Cascade);
452
-                });
453
-
454
-            migrationBuilder.CreateTable(
455
-                name: "Properties",
456
-                columns: table => new
457
-                {
458
-                    Id = table.Column<int>(nullable: false)
459
-                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
460
-                    Created = table.Column<DateTime>(nullable: false),
461
-                    Modified = table.Column<DateTime>(nullable: false),
462
-                    ModifiedBy = table.Column<string>(nullable: true),
463
-                    CreatedBy = table.Column<string>(nullable: true),
464
-                    PropertyTypeId = table.Column<int>(nullable: false),
465
-                    PropertyName = table.Column<string>(nullable: true),
466
-                    Unit = table.Column<string>(nullable: true),
467
-                    OperationalCosts = table.Column<decimal>(nullable: false),
468
-                    Price = table.Column<decimal>(nullable: false),
469
-                    PricePer = table.Column<string>(nullable: true),
470
-                    IsSale = table.Column<bool>(nullable: false),
471
-                    Description = table.Column<string>(nullable: true),
472
-                    ShortDescription = table.Column<string>(nullable: true),
473
-                    AddressLine1 = table.Column<string>(nullable: true),
474
-                    AddressLine2 = table.Column<string>(nullable: true),
475
-                    AddressLine3 = table.Column<string>(nullable: true),
476
-                    SuburbId = table.Column<int>(nullable: false),
477
-                    CityId = table.Column<int>(nullable: false),
478
-                    ProvinceId = table.Column<int>(nullable: false),
479
-                    Published = table.Column<bool>(nullable: false)
480
-                },
481
-                constraints: table =>
482
-                {
483
-                    table.PrimaryKey("PK_Properties", x => x.Id);
484
-                    table.ForeignKey(
485
-                        name: "FK_Properties_Cities_CityId",
486
-                        column: x => x.CityId,
487
-                        principalTable: "Cities",
488
-                        principalColumn: "Id",
489
-                        onDelete: ReferentialAction.Cascade);
490
-                    table.ForeignKey(
491
-                        name: "FK_Properties_PropertyTypes_PropertyTypeId",
492
-                        column: x => x.PropertyTypeId,
493
-                        principalTable: "PropertyTypes",
494
-                        principalColumn: "Id",
495
-                        onDelete: ReferentialAction.Cascade);
496
-                    table.ForeignKey(
497
-                        name: "FK_Properties_Provinces_ProvinceId",
498
-                        column: x => x.ProvinceId,
499
-                        principalTable: "Provinces",
500
-                        principalColumn: "Id");
501
-                    table.ForeignKey(
502
-                        name: "FK_Properties_Suburbs_SuburbId",
503
-                        column: x => x.SuburbId,
504
-                        principalTable: "Suburbs",
505
-                        principalColumn: "Id");
506
-                });
507
-
508
-            migrationBuilder.CreateTable(
509
-                name: "PropertyImages",
510
-                columns: table => new
511
-                {
512
-                    Id = table.Column<int>(nullable: false)
513
-                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
514
-                    Created = table.Column<DateTime>(nullable: false),
515
-                    Modified = table.Column<DateTime>(nullable: false),
516
-                    ModifiedBy = table.Column<string>(nullable: true),
517
-                    PropertyId = table.Column<int>(nullable: false),
518
-                    Image = table.Column<string>(nullable: true),
519
-                    IsDefault = table.Column<bool>(nullable: false)
520
-                },
521
-                constraints: table =>
522
-                {
523
-                    table.PrimaryKey("PK_PropertyImages", x => x.Id);
524
-                    table.ForeignKey(
525
-                        name: "FK_PropertyImages_Properties_PropertyId",
526
-                        column: x => x.PropertyId,
527
-                        principalTable: "Properties",
528
-                        principalColumn: "Id",
529
-                        onDelete: ReferentialAction.Cascade);
530
-                });
531
-
532
-            migrationBuilder.CreateTable(
533
-                name: "PropertyUserFields",
534
-                columns: table => new
535
-                {
536
-                    Id = table.Column<int>(nullable: false)
537
-                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
538
-                    Created = table.Column<DateTime>(nullable: false),
539
-                    Modified = table.Column<DateTime>(nullable: false),
540
-                    ModifiedBy = table.Column<string>(nullable: true),
541
-                    PropertyId = table.Column<int>(nullable: false),
542
-                    UserDefinedFieldId = table.Column<int>(nullable: false),
543
-                    Value = table.Column<string>(nullable: true),
544
-                    Description = table.Column<string>(nullable: true)
545
-                },
546
-                constraints: table =>
547
-                {
548
-                    table.PrimaryKey("PK_PropertyUserFields", x => x.Id);
549
-                    table.ForeignKey(
550
-                        name: "FK_PropertyUserFields_Properties_PropertyId",
551
-                        column: x => x.PropertyId,
552
-                        principalTable: "Properties",
553
-                        principalColumn: "Id",
554
-                        onDelete: ReferentialAction.Cascade);
555
-                    table.ForeignKey(
556
-                        name: "FK_PropertyUserFields_UserDefinedFields_UserDefinedFieldId",
557
-                        column: x => x.UserDefinedFieldId,
558
-                        principalTable: "UserDefinedFields",
559
-                        principalColumn: "Id",
560
-                        onDelete: ReferentialAction.Cascade);
561
-                });
562
-
563
-            migrationBuilder.CreateIndex(
564
-                name: "IX_Accounts_SMTPHostId",
565
-                table: "Accounts",
566
-                column: "SMTPHostId");
567
-
568
-            migrationBuilder.CreateIndex(
569
-                name: "IX_Agents_AgencyId",
570
-                table: "Agents",
571
-                column: "AgencyId");
572
-
573
-            migrationBuilder.CreateIndex(
574
-                name: "IX_Agents_UserId",
575
-                table: "Agents",
576
-                column: "UserId");
577
-
578
-            migrationBuilder.CreateIndex(
579
-                name: "IX_Cities_ProvinceId",
580
-                table: "Cities",
581
-                column: "ProvinceId");
582
-
583
-            migrationBuilder.CreateIndex(
584
-                name: "IX_Emails_SenderId",
585
-                table: "Emails",
586
-                column: "SenderId");
587
-
588
-            migrationBuilder.CreateIndex(
589
-                name: "IX_Individuals_UserId",
590
-                table: "Individuals",
591
-                column: "UserId");
592
-
593
-            migrationBuilder.CreateIndex(
594
-                name: "IX_Properties_CityId",
595
-                table: "Properties",
596
-                column: "CityId");
597
-
598
-            migrationBuilder.CreateIndex(
599
-                name: "IX_Properties_PropertyTypeId",
600
-                table: "Properties",
601
-                column: "PropertyTypeId");
602
-
603
-            migrationBuilder.CreateIndex(
604
-                name: "IX_Properties_ProvinceId",
605
-                table: "Properties",
606
-                column: "ProvinceId");
607
-
608
-            migrationBuilder.CreateIndex(
609
-                name: "IX_Properties_SuburbId",
610
-                table: "Properties",
611
-                column: "SuburbId");
612
-
613
-            migrationBuilder.CreateIndex(
614
-                name: "IX_PropertyImages_PropertyId",
615
-                table: "PropertyImages",
616
-                column: "PropertyId");
617
-
618
-            migrationBuilder.CreateIndex(
619
-                name: "IX_PropertyUserFields_PropertyId",
620
-                table: "PropertyUserFields",
621
-                column: "PropertyId");
622
-
623
-            migrationBuilder.CreateIndex(
624
-                name: "IX_PropertyUserFields_UserDefinedFieldId",
625
-                table: "PropertyUserFields",
626
-                column: "UserDefinedFieldId");
627
-
628
-            migrationBuilder.CreateIndex(
629
-                name: "IX_Suburbs_CityId",
630
-                table: "Suburbs",
631
-                column: "CityId");
632
-
633
-            migrationBuilder.CreateIndex(
634
-                name: "IX_UnitConfigurations_Code",
635
-                table: "UnitConfigurations",
636
-                column: "Code",
637
-                unique: true);
638
-
639
-            migrationBuilder.CreateIndex(
640
-                name: "IX_UnitConfigurationTypes_UnitConfigurationId",
641
-                table: "UnitConfigurationTypes",
642
-                column: "UnitConfigurationId");
643
-
644
-            migrationBuilder.CreateIndex(
645
-                name: "IX_UserDefinedFields_GroupId",
646
-                table: "UserDefinedFields",
647
-                column: "GroupId");
648
-
649
-            migrationBuilder.CreateIndex(
650
-                name: "IX_Weeks_AgencyId",
651
-                table: "Weeks",
652
-                column: "AgencyId");
653
-
654
-            migrationBuilder.CreateIndex(
655
-                name: "IX_Weeks_AgentId",
656
-                table: "Weeks",
657
-                column: "AgentId");
658
-
659
-            migrationBuilder.CreateIndex(
660
-                name: "IX_Weeks_OwnerId",
661
-                table: "Weeks",
662
-                column: "OwnerId");
663
-
664
-            migrationBuilder.CreateIndex(
665
-                name: "IX_Weeks_RegionId",
666
-                table: "Weeks",
667
-                column: "RegionId");
668
-
669
-            migrationBuilder.CreateIndex(
670
-                name: "IX_Weeks_StatusId",
671
-                table: "Weeks",
672
-                column: "StatusId");
673
-        }
674
-
675
-        protected override void Down(MigrationBuilder migrationBuilder)
676
-        {
677
-            migrationBuilder.DropTable(
678
-                name: "Emails");
679
-
680
-            migrationBuilder.DropTable(
681
-                name: "PropertyImages");
682
-
683
-            migrationBuilder.DropTable(
684
-                name: "PropertyUserFields");
685
-
686
-            migrationBuilder.DropTable(
687
-                name: "Seasons");
688
-
689
-            migrationBuilder.DropTable(
690
-                name: "UnitConfigurationTypes");
691
-
692
-            migrationBuilder.DropTable(
693
-                name: "Weeks");
694
-
695
-            migrationBuilder.DropTable(
696
-                name: "Accounts");
697
-
698
-            migrationBuilder.DropTable(
699
-                name: "Properties");
700
-
701
-            migrationBuilder.DropTable(
702
-                name: "UserDefinedFields");
703
-
704
-            migrationBuilder.DropTable(
705
-                name: "UnitConfigurations");
706
-
707
-            migrationBuilder.DropTable(
708
-                name: "Agents");
709
-
710
-            migrationBuilder.DropTable(
711
-                name: "Individuals");
712
-
713
-            migrationBuilder.DropTable(
714
-                name: "Status");
715
-
716
-            migrationBuilder.DropTable(
717
-                name: "Hosts");
718
-
719
-            migrationBuilder.DropTable(
720
-                name: "PropertyTypes");
721
-
722
-            migrationBuilder.DropTable(
723
-                name: "Suburbs");
724
-
725
-            migrationBuilder.DropTable(
726
-                name: "UserDefinedGroups");
727
-
728
-            migrationBuilder.DropTable(
729
-                name: "Agencies");
730
-
731
-            migrationBuilder.DropTable(
732
-                name: "Users");
733
-
734
-            migrationBuilder.DropTable(
735
-                name: "Cities");
736
-
737
-            migrationBuilder.DropTable(
738
-                name: "Provinces");
739
-        }
740
-    }
741
-}

+ 0
- 773
UnivateProperties_API/Migrations/20190904111234_AgentAsRep.Designer.cs Bestand weergeven

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

+ 0
- 23
UnivateProperties_API/Migrations/20190904111234_AgentAsRep.cs Bestand weergeven

@@ -1,23 +0,0 @@
1
-using Microsoft.EntityFrameworkCore.Migrations;
2
-
3
-namespace UnivateProperties_API.Migrations
4
-{
5
-    public partial class AgentAsRep : Migration
6
-    {
7
-        protected override void Up(MigrationBuilder migrationBuilder)
8
-        {
9
-            migrationBuilder.AddColumn<bool>(
10
-                name: "AgentAsRep",
11
-                table: "Weeks",
12
-                nullable: false,
13
-                defaultValue: false);
14
-        }
15
-
16
-        protected override void Down(MigrationBuilder migrationBuilder)
17
-        {
18
-            migrationBuilder.DropColumn(
19
-                name: "AgentAsRep",
20
-                table: "Weeks");
21
-        }
22
-    }
23
-}

+ 0
- 775
UnivateProperties_API/Migrations/20190905084739_AddedSellPrice.Designer.cs Bestand weergeven

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

+ 0
- 23
UnivateProperties_API/Migrations/20190905084739_AddedSellPrice.cs Bestand weergeven

@@ -1,23 +0,0 @@
1
-using Microsoft.EntityFrameworkCore.Migrations;
2
-
3
-namespace UnivateProperties_API.Migrations
4
-{
5
-    public partial class AddedSellPrice : Migration
6
-    {
7
-        protected override void Up(MigrationBuilder migrationBuilder)
8
-        {
9
-            migrationBuilder.AddColumn<double>(
10
-                name: "SellPrice",
11
-                table: "Weeks",
12
-                nullable: false,
13
-                defaultValue: 0.0);
14
-        }
15
-
16
-        protected override void Down(MigrationBuilder migrationBuilder)
17
-        {
18
-            migrationBuilder.DropColumn(
19
-                name: "SellPrice",
20
-                table: "Weeks");
21
-        }
22
-    }
23
-}

+ 0
- 951
UnivateProperties_API/Migrations/20190905133540_BanksAddresses.Designer.cs Bestand weergeven

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

+ 0
- 416
UnivateProperties_API/Migrations/20190905133540_BanksAddresses.cs Bestand weergeven

@@ -1,416 +0,0 @@
1
-using System;
2
-using Microsoft.EntityFrameworkCore.Migrations;
3
-using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
4
-
5
-namespace UnivateProperties_API.Migrations
6
-{
7
-    public partial class BanksAddresses : Migration
8
-    {
9
-        protected override void Up(MigrationBuilder migrationBuilder)
10
-        {
11
-            migrationBuilder.DropForeignKey(
12
-                name: "FK_Agents_Users_UserId",
13
-                table: "Agents");
14
-
15
-            migrationBuilder.DropForeignKey(
16
-                name: "FK_Individuals_Users_UserId",
17
-                table: "Individuals");
18
-
19
-            migrationBuilder.AddColumn<int>(
20
-                name: "AgencyId",
21
-                table: "Properties",
22
-                nullable: true);
23
-
24
-            migrationBuilder.AddColumn<int>(
25
-                name: "AgentId",
26
-                table: "Properties",
27
-                nullable: true);
28
-
29
-            migrationBuilder.AddColumn<int>(
30
-                name: "OwnerId",
31
-                table: "Properties",
32
-                nullable: true);
33
-
34
-            migrationBuilder.AddColumn<int>(
35
-                name: "StatusId",
36
-                table: "Properties",
37
-                nullable: true);
38
-
39
-            migrationBuilder.AlterColumn<int>(
40
-                name: "UserId",
41
-                table: "Individuals",
42
-                nullable: true,
43
-                oldClrType: typeof(int));
44
-
45
-            migrationBuilder.AddColumn<int>(
46
-                name: "AddressId",
47
-                table: "Individuals",
48
-                nullable: true);
49
-
50
-            migrationBuilder.AddColumn<string>(
51
-                name: "CompanyRegNumber",
52
-                table: "Individuals",
53
-                nullable: true);
54
-
55
-            migrationBuilder.AddColumn<string>(
56
-                name: "IdNumber",
57
-                table: "Individuals",
58
-                nullable: true);
59
-
60
-            migrationBuilder.AddColumn<string>(
61
-                name: "IncomeTaxNumber",
62
-                table: "Individuals",
63
-                nullable: true);
64
-
65
-            migrationBuilder.AddColumn<string>(
66
-                name: "MaritalStatus",
67
-                table: "Individuals",
68
-                nullable: true);
69
-
70
-            migrationBuilder.AlterColumn<int>(
71
-                name: "UserId",
72
-                table: "Agents",
73
-                nullable: true,
74
-                oldClrType: typeof(int));
75
-
76
-            migrationBuilder.CreateTable(
77
-                name: "Addresses",
78
-                columns: table => new
79
-                {
80
-                    Id = table.Column<int>(nullable: false)
81
-                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
82
-                    Created = table.Column<DateTime>(nullable: false),
83
-                    Modified = table.Column<DateTime>(nullable: false),
84
-                    ModifiedBy = table.Column<string>(nullable: true),
85
-                    StreetNumber = table.Column<string>(nullable: true),
86
-                    Street = table.Column<string>(nullable: true),
87
-                    Suburb = table.Column<string>(nullable: true),
88
-                    City = table.Column<string>(nullable: true),
89
-                    PostalCode = table.Column<string>(nullable: true)
90
-                },
91
-                constraints: table =>
92
-                {
93
-                    table.PrimaryKey("PK_Addresses", x => x.Id);
94
-                });
95
-
96
-            migrationBuilder.CreateTable(
97
-                name: "Banks",
98
-                columns: table => new
99
-                {
100
-                    Id = table.Column<int>(nullable: false)
101
-                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
102
-                    Created = table.Column<DateTime>(nullable: false),
103
-                    Modified = table.Column<DateTime>(nullable: false),
104
-                    ModifiedBy = table.Column<string>(nullable: true),
105
-                    Name = table.Column<string>(nullable: true),
106
-                    UniversalBranchCode = table.Column<string>(nullable: true)
107
-                },
108
-                constraints: table =>
109
-                {
110
-                    table.PrimaryKey("PK_Banks", x => x.Id);
111
-                });
112
-
113
-            migrationBuilder.CreateTable(
114
-                name: "ProcessFlows",
115
-                columns: table => new
116
-                {
117
-                    Id = table.Column<int>(nullable: false)
118
-                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
119
-                    Created = table.Column<DateTime>(nullable: false),
120
-                    Modified = table.Column<DateTime>(nullable: false),
121
-                    ModifiedBy = table.Column<string>(nullable: true),
122
-                    TimeshareID = table.Column<int>(nullable: true),
123
-                    PropertyID = table.Column<int>(nullable: true),
124
-                    StatusID = table.Column<int>(nullable: false)
125
-                },
126
-                constraints: table =>
127
-                {
128
-                    table.PrimaryKey("PK_ProcessFlows", x => x.Id);
129
-                    table.ForeignKey(
130
-                        name: "FK_ProcessFlows_Properties_PropertyID",
131
-                        column: x => x.PropertyID,
132
-                        principalTable: "Properties",
133
-                        principalColumn: "Id",
134
-                        onDelete: ReferentialAction.Restrict);
135
-                    table.ForeignKey(
136
-                        name: "FK_ProcessFlows_Status_StatusID",
137
-                        column: x => x.StatusID,
138
-                        principalTable: "Status",
139
-                        principalColumn: "Id",
140
-                        onDelete: ReferentialAction.Cascade);
141
-                    table.ForeignKey(
142
-                        name: "FK_ProcessFlows_Weeks_TimeshareID",
143
-                        column: x => x.TimeshareID,
144
-                        principalTable: "Weeks",
145
-                        principalColumn: "Id",
146
-                        onDelete: ReferentialAction.Restrict);
147
-                });
148
-
149
-            migrationBuilder.CreateTable(
150
-                name: "BankAccounts",
151
-                columns: table => new
152
-                {
153
-                    Id = table.Column<int>(nullable: false)
154
-                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
155
-                    Created = table.Column<DateTime>(nullable: false),
156
-                    Modified = table.Column<DateTime>(nullable: false),
157
-                    ModifiedBy = table.Column<string>(nullable: true),
158
-                    AccountHolder = table.Column<string>(nullable: true),
159
-                    AccountNumber = table.Column<string>(nullable: true),
160
-                    BankId = table.Column<int>(nullable: false),
161
-                    OwnerId = table.Column<int>(nullable: true)
162
-                },
163
-                constraints: table =>
164
-                {
165
-                    table.PrimaryKey("PK_BankAccounts", x => x.Id);
166
-                    table.ForeignKey(
167
-                        name: "FK_BankAccounts_Banks_BankId",
168
-                        column: x => x.BankId,
169
-                        principalTable: "Banks",
170
-                        principalColumn: "Id",
171
-                        onDelete: ReferentialAction.Cascade);
172
-                    table.ForeignKey(
173
-                        name: "FK_BankAccounts_Individuals_OwnerId",
174
-                        column: x => x.OwnerId,
175
-                        principalTable: "Individuals",
176
-                        principalColumn: "Id",
177
-                        onDelete: ReferentialAction.Restrict);
178
-                });
179
-
180
-            migrationBuilder.CreateIndex(
181
-                name: "IX_Properties_AgencyId",
182
-                table: "Properties",
183
-                column: "AgencyId");
184
-
185
-            migrationBuilder.CreateIndex(
186
-                name: "IX_Properties_AgentId",
187
-                table: "Properties",
188
-                column: "AgentId");
189
-
190
-            migrationBuilder.CreateIndex(
191
-                name: "IX_Properties_OwnerId",
192
-                table: "Properties",
193
-                column: "OwnerId");
194
-
195
-            migrationBuilder.CreateIndex(
196
-                name: "IX_Properties_StatusId",
197
-                table: "Properties",
198
-                column: "StatusId");
199
-
200
-            migrationBuilder.CreateIndex(
201
-                name: "IX_Individuals_AddressId",
202
-                table: "Individuals",
203
-                column: "AddressId");
204
-
205
-            migrationBuilder.CreateIndex(
206
-                name: "IX_BankAccounts_BankId",
207
-                table: "BankAccounts",
208
-                column: "BankId");
209
-
210
-            migrationBuilder.CreateIndex(
211
-                name: "IX_BankAccounts_OwnerId",
212
-                table: "BankAccounts",
213
-                column: "OwnerId");
214
-
215
-            migrationBuilder.CreateIndex(
216
-                name: "IX_ProcessFlows_PropertyID",
217
-                table: "ProcessFlows",
218
-                column: "PropertyID");
219
-
220
-            migrationBuilder.CreateIndex(
221
-                name: "IX_ProcessFlows_StatusID",
222
-                table: "ProcessFlows",
223
-                column: "StatusID");
224
-
225
-            migrationBuilder.CreateIndex(
226
-                name: "IX_ProcessFlows_TimeshareID",
227
-                table: "ProcessFlows",
228
-                column: "TimeshareID");
229
-
230
-            migrationBuilder.AddForeignKey(
231
-                name: "FK_Agents_Users_UserId",
232
-                table: "Agents",
233
-                column: "UserId",
234
-                principalTable: "Users",
235
-                principalColumn: "Id",
236
-                onDelete: ReferentialAction.Restrict);
237
-
238
-            migrationBuilder.AddForeignKey(
239
-                name: "FK_Individuals_Addresses_AddressId",
240
-                table: "Individuals",
241
-                column: "AddressId",
242
-                principalTable: "Addresses",
243
-                principalColumn: "Id",
244
-                onDelete: ReferentialAction.Restrict);
245
-
246
-            migrationBuilder.AddForeignKey(
247
-                name: "FK_Individuals_Users_UserId",
248
-                table: "Individuals",
249
-                column: "UserId",
250
-                principalTable: "Users",
251
-                principalColumn: "Id",
252
-                onDelete: ReferentialAction.Restrict);
253
-
254
-            migrationBuilder.AddForeignKey(
255
-                name: "FK_Properties_Agencies_AgencyId",
256
-                table: "Properties",
257
-                column: "AgencyId",
258
-                principalTable: "Agencies",
259
-                principalColumn: "Id",
260
-                onDelete: ReferentialAction.Restrict);
261
-
262
-            migrationBuilder.AddForeignKey(
263
-                name: "FK_Properties_Agents_AgentId",
264
-                table: "Properties",
265
-                column: "AgentId",
266
-                principalTable: "Agents",
267
-                principalColumn: "Id",
268
-                onDelete: ReferentialAction.Restrict);
269
-
270
-            migrationBuilder.AddForeignKey(
271
-                name: "FK_Properties_Individuals_OwnerId",
272
-                table: "Properties",
273
-                column: "OwnerId",
274
-                principalTable: "Individuals",
275
-                principalColumn: "Id",
276
-                onDelete: ReferentialAction.Restrict);
277
-
278
-            migrationBuilder.AddForeignKey(
279
-                name: "FK_Properties_Status_StatusId",
280
-                table: "Properties",
281
-                column: "StatusId",
282
-                principalTable: "Status",
283
-                principalColumn: "Id",
284
-                onDelete: ReferentialAction.Restrict);
285
-        }
286
-
287
-        protected override void Down(MigrationBuilder migrationBuilder)
288
-        {
289
-            migrationBuilder.DropForeignKey(
290
-                name: "FK_Agents_Users_UserId",
291
-                table: "Agents");
292
-
293
-            migrationBuilder.DropForeignKey(
294
-                name: "FK_Individuals_Addresses_AddressId",
295
-                table: "Individuals");
296
-
297
-            migrationBuilder.DropForeignKey(
298
-                name: "FK_Individuals_Users_UserId",
299
-                table: "Individuals");
300
-
301
-            migrationBuilder.DropForeignKey(
302
-                name: "FK_Properties_Agencies_AgencyId",
303
-                table: "Properties");
304
-
305
-            migrationBuilder.DropForeignKey(
306
-                name: "FK_Properties_Agents_AgentId",
307
-                table: "Properties");
308
-
309
-            migrationBuilder.DropForeignKey(
310
-                name: "FK_Properties_Individuals_OwnerId",
311
-                table: "Properties");
312
-
313
-            migrationBuilder.DropForeignKey(
314
-                name: "FK_Properties_Status_StatusId",
315
-                table: "Properties");
316
-
317
-            migrationBuilder.DropTable(
318
-                name: "Addresses");
319
-
320
-            migrationBuilder.DropTable(
321
-                name: "BankAccounts");
322
-
323
-            migrationBuilder.DropTable(
324
-                name: "ProcessFlows");
325
-
326
-            migrationBuilder.DropTable(
327
-                name: "Banks");
328
-
329
-            migrationBuilder.DropIndex(
330
-                name: "IX_Properties_AgencyId",
331
-                table: "Properties");
332
-
333
-            migrationBuilder.DropIndex(
334
-                name: "IX_Properties_AgentId",
335
-                table: "Properties");
336
-
337
-            migrationBuilder.DropIndex(
338
-                name: "IX_Properties_OwnerId",
339
-                table: "Properties");
340
-
341
-            migrationBuilder.DropIndex(
342
-                name: "IX_Properties_StatusId",
343
-                table: "Properties");
344
-
345
-            migrationBuilder.DropIndex(
346
-                name: "IX_Individuals_AddressId",
347
-                table: "Individuals");
348
-
349
-            migrationBuilder.DropColumn(
350
-                name: "AgencyId",
351
-                table: "Properties");
352
-
353
-            migrationBuilder.DropColumn(
354
-                name: "AgentId",
355
-                table: "Properties");
356
-
357
-            migrationBuilder.DropColumn(
358
-                name: "OwnerId",
359
-                table: "Properties");
360
-
361
-            migrationBuilder.DropColumn(
362
-                name: "StatusId",
363
-                table: "Properties");
364
-
365
-            migrationBuilder.DropColumn(
366
-                name: "AddressId",
367
-                table: "Individuals");
368
-
369
-            migrationBuilder.DropColumn(
370
-                name: "CompanyRegNumber",
371
-                table: "Individuals");
372
-
373
-            migrationBuilder.DropColumn(
374
-                name: "IdNumber",
375
-                table: "Individuals");
376
-
377
-            migrationBuilder.DropColumn(
378
-                name: "IncomeTaxNumber",
379
-                table: "Individuals");
380
-
381
-            migrationBuilder.DropColumn(
382
-                name: "MaritalStatus",
383
-                table: "Individuals");
384
-
385
-            migrationBuilder.AlterColumn<int>(
386
-                name: "UserId",
387
-                table: "Individuals",
388
-                nullable: false,
389
-                oldClrType: typeof(int),
390
-                oldNullable: true);
391
-
392
-            migrationBuilder.AlterColumn<int>(
393
-                name: "UserId",
394
-                table: "Agents",
395
-                nullable: false,
396
-                oldClrType: typeof(int),
397
-                oldNullable: true);
398
-
399
-            migrationBuilder.AddForeignKey(
400
-                name: "FK_Agents_Users_UserId",
401
-                table: "Agents",
402
-                column: "UserId",
403
-                principalTable: "Users",
404
-                principalColumn: "Id",
405
-                onDelete: ReferentialAction.Cascade);
406
-
407
-            migrationBuilder.AddForeignKey(
408
-                name: "FK_Individuals_Users_UserId",
409
-                table: "Individuals",
410
-                column: "UserId",
411
-                principalTable: "Users",
412
-                principalColumn: "Id",
413
-                onDelete: ReferentialAction.Cascade);
414
-        }
415
-    }
416
-}

+ 0
- 1008
UnivateProperties_API/Migrations/20190906105051_Process.Designer.cs
Diff onderdrukt omdat het te groot bestand
Bestand weergeven


+ 0
- 84
UnivateProperties_API/Migrations/20190906105051_Process.cs Bestand weergeven

@@ -1,84 +0,0 @@
1
-using System;
2
-using Microsoft.EntityFrameworkCore.Migrations;
3
-using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
4
-
5
-namespace UnivateProperties_API.Migrations
6
-{
7
-    public partial class Process : Migration
8
-    {
9
-        protected override void Up(MigrationBuilder migrationBuilder)
10
-        {
11
-            migrationBuilder.CreateTable(
12
-                name: "BidItems",
13
-                columns: table => new
14
-                {
15
-                    Id = table.Column<int>(nullable: false)
16
-                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
17
-                    Created = table.Column<DateTime>(nullable: false),
18
-                    Modified = table.Column<DateTime>(nullable: false),
19
-                    ModifiedBy = table.Column<string>(nullable: true),
20
-                    Amount = table.Column<double>(nullable: false),
21
-                    StatusId = table.Column<int>(nullable: true),
22
-                    BidMakerId = table.Column<int>(nullable: true),
23
-                    TimeshareWeekId = table.Column<int>(nullable: true),
24
-                    PropertyId = table.Column<int>(nullable: true),
25
-                    Comment = table.Column<string>(nullable: true),
26
-                    DeclinedReason = table.Column<string>(nullable: true)
27
-                },
28
-                constraints: table =>
29
-                {
30
-                    table.PrimaryKey("PK_BidItems", x => x.Id);
31
-                    table.ForeignKey(
32
-                        name: "FK_BidItems_Individuals_BidMakerId",
33
-                        column: x => x.BidMakerId,
34
-                        principalTable: "Individuals",
35
-                        principalColumn: "Id",
36
-                        onDelete: ReferentialAction.Restrict);
37
-                    table.ForeignKey(
38
-                        name: "FK_BidItems_Properties_PropertyId",
39
-                        column: x => x.PropertyId,
40
-                        principalTable: "Properties",
41
-                        principalColumn: "Id",
42
-                        onDelete: ReferentialAction.Restrict);
43
-                    table.ForeignKey(
44
-                        name: "FK_BidItems_Status_StatusId",
45
-                        column: x => x.StatusId,
46
-                        principalTable: "Status",
47
-                        principalColumn: "Id",
48
-                        onDelete: ReferentialAction.Restrict);
49
-                    table.ForeignKey(
50
-                        name: "FK_BidItems_Weeks_TimeshareWeekId",
51
-                        column: x => x.TimeshareWeekId,
52
-                        principalTable: "Weeks",
53
-                        principalColumn: "Id",
54
-                        onDelete: ReferentialAction.Restrict);
55
-                });
56
-
57
-            migrationBuilder.CreateIndex(
58
-                name: "IX_BidItems_BidMakerId",
59
-                table: "BidItems",
60
-                column: "BidMakerId");
61
-
62
-            migrationBuilder.CreateIndex(
63
-                name: "IX_BidItems_PropertyId",
64
-                table: "BidItems",
65
-                column: "PropertyId");
66
-
67
-            migrationBuilder.CreateIndex(
68
-                name: "IX_BidItems_StatusId",
69
-                table: "BidItems",
70
-                column: "StatusId");
71
-
72
-            migrationBuilder.CreateIndex(
73
-                name: "IX_BidItems_TimeshareWeekId",
74
-                table: "BidItems",
75
-                column: "TimeshareWeekId");
76
-        }
77
-
78
-        protected override void Down(MigrationBuilder migrationBuilder)
79
-        {
80
-            migrationBuilder.DropTable(
81
-                name: "BidItems");
82
-        }
83
-    }
84
-}

+ 0
- 1010
UnivateProperties_API/Migrations/20190909074136_UnitNumber.Designer.cs
Diff onderdrukt omdat het te groot bestand
Bestand weergeven


+ 0
- 22
UnivateProperties_API/Migrations/20190909074136_UnitNumber.cs Bestand weergeven

@@ -1,22 +0,0 @@
1
-using Microsoft.EntityFrameworkCore.Migrations;
2
-
3
-namespace UnivateProperties_API.Migrations
4
-{
5
-    public partial class UnitNumber : Migration
6
-    {
7
-        protected override void Up(MigrationBuilder migrationBuilder)
8
-        {
9
-            migrationBuilder.AddColumn<string>(
10
-                name: "UnitNumber",
11
-                table: "Weeks",
12
-                nullable: true);
13
-        }
14
-
15
-        protected override void Down(MigrationBuilder migrationBuilder)
16
-        {
17
-            migrationBuilder.DropColumn(
18
-                name: "UnitNumber",
19
-                table: "Weeks");
20
-        }
21
-    }
22
-}

+ 0
- 1030
UnivateProperties_API/Migrations/20190910092816_GeorgeNew.Designer.cs
Diff onderdrukt omdat het te groot bestand
Bestand weergeven


+ 0
- 53
UnivateProperties_API/Migrations/20190910092816_GeorgeNew.cs Bestand weergeven

@@ -1,53 +0,0 @@
1
-using System;
2
-using Microsoft.EntityFrameworkCore.Migrations;
3
-using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
4
-
5
-namespace UnivateProperties_API.Migrations
6
-{
7
-    public partial class GeorgeNew : Migration
8
-    {
9
-        protected override void Up(MigrationBuilder migrationBuilder)
10
-        {
11
-            migrationBuilder.DropColumn(
12
-                name: "CreatedBy",
13
-                table: "Properties");
14
-
15
-            migrationBuilder.AddColumn<int>(
16
-                name: "GCRecord",
17
-                table: "Properties",
18
-                nullable: true);
19
-
20
-            migrationBuilder.CreateTable(
21
-                name: "SearchLogs",
22
-                columns: table => new
23
-                {
24
-                    Id = table.Column<int>(nullable: false)
25
-                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
26
-                    Created = table.Column<DateTime>(nullable: false),
27
-                    Modified = table.Column<DateTime>(nullable: false),
28
-                    ModifiedBy = table.Column<string>(nullable: true),
29
-                    UserID = table.Column<int>(nullable: true),
30
-                    Search = table.Column<string>(nullable: true)
31
-                },
32
-                constraints: table =>
33
-                {
34
-                    table.PrimaryKey("PK_SearchLogs", x => x.Id);
35
-                });
36
-        }
37
-
38
-        protected override void Down(MigrationBuilder migrationBuilder)
39
-        {
40
-            migrationBuilder.DropTable(
41
-                name: "SearchLogs");
42
-
43
-            migrationBuilder.DropColumn(
44
-                name: "GCRecord",
45
-                table: "Properties");
46
-
47
-            migrationBuilder.AddColumn<string>(
48
-                name: "CreatedBy",
49
-                table: "Properties",
50
-                nullable: true);
51
-        }
52
-    }
53
-}

+ 0
- 1121
UnivateProperties_API/Migrations/20191003082255_IsDeleted.Designer.cs
Diff onderdrukt omdat het te groot bestand
Bestand weergeven


+ 0
- 321
UnivateProperties_API/Migrations/20191003082255_IsDeleted.cs Bestand weergeven

@@ -1,321 +0,0 @@
1
-using System;
2
-using Microsoft.EntityFrameworkCore.Migrations;
3
-using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
4
-
5
-namespace UnivateProperties_API.Migrations
6
-{
7
-    public partial class IsDeleted : Migration
8
-    {
9
-        protected override void Up(MigrationBuilder migrationBuilder)
10
-        {
11
-            migrationBuilder.AddColumn<bool>(
12
-                name: "IsDeleted",
13
-                table: "Weeks",
14
-                nullable: false,
15
-                defaultValue: false);
16
-
17
-            migrationBuilder.AddColumn<bool>(
18
-                name: "IsDeleted",
19
-                table: "Users",
20
-                nullable: false,
21
-                defaultValue: false);
22
-
23
-            migrationBuilder.AddColumn<bool>(
24
-                name: "IsDeleted",
25
-                table: "UserDefinedGroups",
26
-                nullable: false,
27
-                defaultValue: false);
28
-
29
-            migrationBuilder.AddColumn<bool>(
30
-                name: "IsDeleted",
31
-                table: "UserDefinedFields",
32
-                nullable: false,
33
-                defaultValue: false);
34
-
35
-            migrationBuilder.AddColumn<bool>(
36
-                name: "IsDeleted",
37
-                table: "UnitConfigurationTypes",
38
-                nullable: false,
39
-                defaultValue: false);
40
-
41
-            migrationBuilder.AddColumn<bool>(
42
-                name: "IsDeleted",
43
-                table: "UnitConfigurations",
44
-                nullable: false,
45
-                defaultValue: false);
46
-
47
-            migrationBuilder.AddColumn<bool>(
48
-                name: "IsDeleted",
49
-                table: "Suburbs",
50
-                nullable: false,
51
-                defaultValue: false);
52
-
53
-            migrationBuilder.AddColumn<bool>(
54
-                name: "IsDeleted",
55
-                table: "Status",
56
-                nullable: false,
57
-                defaultValue: false);
58
-
59
-            migrationBuilder.AddColumn<bool>(
60
-                name: "IsDeleted",
61
-                table: "Seasons",
62
-                nullable: false,
63
-                defaultValue: false);
64
-
65
-            migrationBuilder.AddColumn<bool>(
66
-                name: "IsDeleted",
67
-                table: "SearchLogs",
68
-                nullable: false,
69
-                defaultValue: false);
70
-
71
-            migrationBuilder.AddColumn<bool>(
72
-                name: "IsDeleted",
73
-                table: "Provinces",
74
-                nullable: false,
75
-                defaultValue: false);
76
-
77
-            migrationBuilder.AddColumn<bool>(
78
-                name: "IsDeleted",
79
-                table: "PropertyUserFields",
80
-                nullable: false,
81
-                defaultValue: false);
82
-
83
-            migrationBuilder.AddColumn<bool>(
84
-                name: "IsDeleted",
85
-                table: "PropertyTypes",
86
-                nullable: false,
87
-                defaultValue: false);
88
-
89
-            migrationBuilder.AddColumn<bool>(
90
-                name: "IsDeleted",
91
-                table: "PropertyImages",
92
-                nullable: false,
93
-                defaultValue: false);
94
-
95
-            migrationBuilder.AddColumn<bool>(
96
-                name: "IsDeleted",
97
-                table: "Properties",
98
-                nullable: false,
99
-                defaultValue: false);
100
-
101
-            migrationBuilder.AddColumn<bool>(
102
-                name: "IsDeleted",
103
-                table: "ProcessFlows",
104
-                nullable: false,
105
-                defaultValue: false);
106
-
107
-            migrationBuilder.AddColumn<bool>(
108
-                name: "IsDeleted",
109
-                table: "Individuals",
110
-                nullable: false,
111
-                defaultValue: false);
112
-
113
-            migrationBuilder.AddColumn<bool>(
114
-                name: "IsDeleted",
115
-                table: "Hosts",
116
-                nullable: false,
117
-                defaultValue: false);
118
-
119
-            migrationBuilder.AddColumn<bool>(
120
-                name: "IsDeleted",
121
-                table: "Emails",
122
-                nullable: false,
123
-                defaultValue: false);
124
-
125
-            migrationBuilder.AddColumn<bool>(
126
-                name: "IsDeleted",
127
-                table: "Cities",
128
-                nullable: false,
129
-                defaultValue: false);
130
-
131
-            migrationBuilder.AddColumn<bool>(
132
-                name: "IsDeleted",
133
-                table: "BidItems",
134
-                nullable: false,
135
-                defaultValue: false);
136
-
137
-            migrationBuilder.AddColumn<bool>(
138
-                name: "IsDeleted",
139
-                table: "Banks",
140
-                nullable: false,
141
-                defaultValue: false);
142
-
143
-            migrationBuilder.AddColumn<bool>(
144
-                name: "IsDeleted",
145
-                table: "BankAccounts",
146
-                nullable: false,
147
-                defaultValue: false);
148
-
149
-            migrationBuilder.AddColumn<bool>(
150
-                name: "IsDeleted",
151
-                table: "Agents",
152
-                nullable: false,
153
-                defaultValue: false);
154
-
155
-            migrationBuilder.AddColumn<bool>(
156
-                name: "IsDeleted",
157
-                table: "Agencies",
158
-                nullable: false,
159
-                defaultValue: false);
160
-
161
-            migrationBuilder.AddColumn<bool>(
162
-                name: "IsDeleted",
163
-                table: "Addresses",
164
-                nullable: false,
165
-                defaultValue: false);
166
-
167
-            migrationBuilder.AddColumn<bool>(
168
-                name: "IsDeleted",
169
-                table: "Accounts",
170
-                nullable: false,
171
-                defaultValue: false);
172
-
173
-            migrationBuilder.CreateTable(
174
-                name: "Person",
175
-                columns: table => new
176
-                {
177
-                    Id = table.Column<int>(nullable: false)
178
-                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
179
-                    Created = table.Column<DateTime>(nullable: false),
180
-                    Modified = table.Column<DateTime>(nullable: false),
181
-                    ModifiedBy = table.Column<string>(nullable: true),
182
-                    IsDeleted = table.Column<bool>(nullable: false),
183
-                    UserId = table.Column<int>(nullable: true),
184
-                    Name = table.Column<string>(nullable: true),
185
-                    Surname = table.Column<string>(nullable: true),
186
-                    Email = table.Column<string>(nullable: true),
187
-                    Telephone = table.Column<string>(nullable: true),
188
-                    CellNumber = table.Column<string>(nullable: true)
189
-                },
190
-                constraints: table =>
191
-                {
192
-                    table.PrimaryKey("PK_Person", x => x.Id);
193
-                    table.ForeignKey(
194
-                        name: "FK_Person_Users_UserId",
195
-                        column: x => x.UserId,
196
-                        principalTable: "Users",
197
-                        principalColumn: "Id",
198
-                        onDelete: ReferentialAction.Restrict);
199
-                });
200
-
201
-            migrationBuilder.CreateIndex(
202
-                name: "IX_Person_UserId",
203
-                table: "Person",
204
-                column: "UserId");
205
-        }
206
-
207
-        protected override void Down(MigrationBuilder migrationBuilder)
208
-        {
209
-            migrationBuilder.DropTable(
210
-                name: "Person");
211
-
212
-            migrationBuilder.DropColumn(
213
-                name: "IsDeleted",
214
-                table: "Weeks");
215
-
216
-            migrationBuilder.DropColumn(
217
-                name: "IsDeleted",
218
-                table: "Users");
219
-
220
-            migrationBuilder.DropColumn(
221
-                name: "IsDeleted",
222
-                table: "UserDefinedGroups");
223
-
224
-            migrationBuilder.DropColumn(
225
-                name: "IsDeleted",
226
-                table: "UserDefinedFields");
227
-
228
-            migrationBuilder.DropColumn(
229
-                name: "IsDeleted",
230
-                table: "UnitConfigurationTypes");
231
-
232
-            migrationBuilder.DropColumn(
233
-                name: "IsDeleted",
234
-                table: "UnitConfigurations");
235
-
236
-            migrationBuilder.DropColumn(
237
-                name: "IsDeleted",
238
-                table: "Suburbs");
239
-
240
-            migrationBuilder.DropColumn(
241
-                name: "IsDeleted",
242
-                table: "Status");
243
-
244
-            migrationBuilder.DropColumn(
245
-                name: "IsDeleted",
246
-                table: "Seasons");
247
-
248
-            migrationBuilder.DropColumn(
249
-                name: "IsDeleted",
250
-                table: "SearchLogs");
251
-
252
-            migrationBuilder.DropColumn(
253
-                name: "IsDeleted",
254
-                table: "Provinces");
255
-
256
-            migrationBuilder.DropColumn(
257
-                name: "IsDeleted",
258
-                table: "PropertyUserFields");
259
-
260
-            migrationBuilder.DropColumn(
261
-                name: "IsDeleted",
262
-                table: "PropertyTypes");
263
-
264
-            migrationBuilder.DropColumn(
265
-                name: "IsDeleted",
266
-                table: "PropertyImages");
267
-
268
-            migrationBuilder.DropColumn(
269
-                name: "IsDeleted",
270
-                table: "Properties");
271
-
272
-            migrationBuilder.DropColumn(
273
-                name: "IsDeleted",
274
-                table: "ProcessFlows");
275
-
276
-            migrationBuilder.DropColumn(
277
-                name: "IsDeleted",
278
-                table: "Individuals");
279
-
280
-            migrationBuilder.DropColumn(
281
-                name: "IsDeleted",
282
-                table: "Hosts");
283
-
284
-            migrationBuilder.DropColumn(
285
-                name: "IsDeleted",
286
-                table: "Emails");
287
-
288
-            migrationBuilder.DropColumn(
289
-                name: "IsDeleted",
290
-                table: "Cities");
291
-
292
-            migrationBuilder.DropColumn(
293
-                name: "IsDeleted",
294
-                table: "BidItems");
295
-
296
-            migrationBuilder.DropColumn(
297
-                name: "IsDeleted",
298
-                table: "Banks");
299
-
300
-            migrationBuilder.DropColumn(
301
-                name: "IsDeleted",
302
-                table: "BankAccounts");
303
-
304
-            migrationBuilder.DropColumn(
305
-                name: "IsDeleted",
306
-                table: "Agents");
307
-
308
-            migrationBuilder.DropColumn(
309
-                name: "IsDeleted",
310
-                table: "Agencies");
311
-
312
-            migrationBuilder.DropColumn(
313
-                name: "IsDeleted",
314
-                table: "Addresses");
315
-
316
-            migrationBuilder.DropColumn(
317
-                name: "IsDeleted",
318
-                table: "Accounts");
319
-        }
320
-    }
321
-}

+ 0
- 1197
UnivateProperties_API/Migrations/20191014123718_Location_Templates2.Designer.cs
Diff onderdrukt omdat het te groot bestand
Bestand weergeven


+ 0
- 1199
UnivateProperties_API/Migrations/20191014123820_Location_Templates.Designer.cs
Diff onderdrukt omdat het te groot bestand
Bestand weergeven


+ 0
- 102
UnivateProperties_API/Migrations/20191014123820_Location_Templates.cs Bestand weergeven

@@ -1,102 +0,0 @@
1
-using System;
2
-using Microsoft.EntityFrameworkCore.Migrations;
3
-using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
4
-
5
-namespace UnivateProperties_API.Migrations
6
-{
7
-    public partial class Location_Templates : Migration
8
-    {
9
-        protected override void Up(MigrationBuilder migrationBuilder)
10
-        {
11
-            migrationBuilder.CreateTable(
12
-                name: "Location",
13
-                columns: table => new
14
-                {
15
-                    Id = table.Column<int>(nullable: false)
16
-                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
17
-                    Created = table.Column<DateTime>(nullable: false),
18
-                    Modified = table.Column<DateTime>(nullable: false),
19
-                    ModifiedBy = table.Column<string>(nullable: true),
20
-                    IsDeleted = table.Column<bool>(nullable: false),
21
-                    IsTesting = table.Column<bool>(nullable: false),
22
-                    PropertyImageLocation = table.Column<string>(nullable: true)
23
-                },
24
-                constraints: table =>
25
-                {
26
-                    table.PrimaryKey("PK_Location", x => x.Id);
27
-                });
28
-
29
-            migrationBuilder.CreateTable(
30
-                name: "Templates",
31
-                columns: table => new
32
-                {
33
-                    Id = table.Column<int>(nullable: false)
34
-                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
35
-                    Created = table.Column<DateTime>(nullable: false),
36
-                    Modified = table.Column<DateTime>(nullable: false),
37
-                    ModifiedBy = table.Column<string>(nullable: true),
38
-                    IsDeleted = table.Column<bool>(nullable: false),
39
-                    Name = table.Column<string>(nullable: true),
40
-                    Subject = table.Column<string>(nullable: true),
41
-                    Body = table.Column<string>(nullable: true)
42
-                },
43
-                constraints: table =>
44
-                {
45
-                    table.PrimaryKey("PK_Templates", x => x.Id);
46
-                });
47
-
48
-            migrationBuilder.CreateTable(
49
-                name: "PlaceHolders",
50
-                columns: table => new
51
-                {
52
-                    Id = table.Column<int>(nullable: false)
53
-                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
54
-                    Name = table.Column<string>(nullable: true),
55
-                    BoundTo = table.Column<string>(nullable: true),
56
-                    TemplateId = table.Column<int>(nullable: false)
57
-                },
58
-                constraints: table =>
59
-                {
60
-                    table.PrimaryKey("PK_PlaceHolders", x => x.Id);
61
-                    table.ForeignKey(
62
-                        name: "FK_PlaceHolders_Templates_TemplateId",
63
-                        column: x => x.TemplateId,
64
-                        principalTable: "Templates",
65
-                        principalColumn: "Id",
66
-                        onDelete: ReferentialAction.Cascade);
67
-                });
68
-
69
-
70
-            migrationBuilder.CreateIndex(
71
-                name: "IX_Individuals_Telephone_CellNumber_Email",
72
-                table: "Individuals",
73
-                columns: new[] { "Telephone", "CellNumber", "Email" },
74
-                unique: true);
75
-
76
-            migrationBuilder.CreateIndex(
77
-                name: "IX_PlaceHolders_TemplateId",
78
-                table: "PlaceHolders",
79
-                column: "TemplateId");
80
-        }
81
-
82
-        protected override void Down(MigrationBuilder migrationBuilder)
83
-        {
84
-            migrationBuilder.DropTable(
85
-                name: "Location");
86
-
87
-            migrationBuilder.DropTable(
88
-                name: "PlaceHolders");
89
-
90
-            migrationBuilder.DropTable(
91
-                name: "Templates");
92
-
93
-            migrationBuilder.DropIndex(
94
-                name: "IX_Users_Username",
95
-                table: "Users");
96
-
97
-            migrationBuilder.DropIndex(
98
-                name: "IX_Individuals_Telephone_CellNumber_Email",
99
-                table: "Individuals");
100
-        }
101
-    }
102
-}

+ 0
- 1211
UnivateProperties_API/Migrations/20191014135639_PlaceHolder.Designer.cs
Diff onderdrukt omdat het te groot bestand
Bestand weergeven


+ 0
- 71
UnivateProperties_API/Migrations/20191014135639_PlaceHolder.cs Bestand weergeven

@@ -1,71 +0,0 @@
1
-using System;
2
-using Microsoft.EntityFrameworkCore.Migrations;
3
-
4
-namespace UnivateProperties_API.Migrations
5
-{
6
-    public partial class PlaceHolder : Migration
7
-    {
8
-        protected override void Up(MigrationBuilder migrationBuilder)
9
-        {
10
-            migrationBuilder.AddColumn<string>(
11
-                name: "BoundToClass",
12
-                table: "PlaceHolders",
13
-                nullable: true);
14
-
15
-            migrationBuilder.AddColumn<string>(
16
-                name: "BoundToClassDisplay",
17
-                table: "PlaceHolders",
18
-                nullable: true);
19
-
20
-            migrationBuilder.AddColumn<DateTime>(
21
-                name: "Created",
22
-                table: "PlaceHolders",
23
-                nullable: false,
24
-                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
25
-
26
-            migrationBuilder.AddColumn<bool>(
27
-                name: "IsDeleted",
28
-                table: "PlaceHolders",
29
-                nullable: false,
30
-                defaultValue: false);
31
-
32
-            migrationBuilder.AddColumn<DateTime>(
33
-                name: "Modified",
34
-                table: "PlaceHolders",
35
-                nullable: false,
36
-                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
37
-
38
-            migrationBuilder.AddColumn<string>(
39
-                name: "ModifiedBy",
40
-                table: "PlaceHolders",
41
-                nullable: true);
42
-        }
43
-
44
-        protected override void Down(MigrationBuilder migrationBuilder)
45
-        {
46
-            migrationBuilder.DropColumn(
47
-                name: "BoundToClass",
48
-                table: "PlaceHolders");
49
-
50
-            migrationBuilder.DropColumn(
51
-                name: "BoundToClassDisplay",
52
-                table: "PlaceHolders");
53
-
54
-            migrationBuilder.DropColumn(
55
-                name: "Created",
56
-                table: "PlaceHolders");
57
-
58
-            migrationBuilder.DropColumn(
59
-                name: "IsDeleted",
60
-                table: "PlaceHolders");
61
-
62
-            migrationBuilder.DropColumn(
63
-                name: "Modified",
64
-                table: "PlaceHolders");
65
-
66
-            migrationBuilder.DropColumn(
67
-                name: "ModifiedBy",
68
-                table: "PlaceHolders");
69
-        }
70
-    }
71
-}

+ 0
- 1215
UnivateProperties_API/Migrations/20191018124608_NewPropertyProperties.Designer.cs
Diff onderdrukt omdat het te groot bestand
Bestand weergeven


+ 0
- 31
UnivateProperties_API/Migrations/20191018124608_NewPropertyProperties.cs Bestand weergeven

@@ -1,31 +0,0 @@
1
-using Microsoft.EntityFrameworkCore.Migrations;
2
-
3
-namespace UnivateProperties_API.Migrations
4
-{
5
-    public partial class NewPropertyProperties : Migration
6
-    {
7
-        protected override void Up(MigrationBuilder migrationBuilder)
8
-        {
9
-            migrationBuilder.AddColumn<string>(
10
-                name: "Video",
11
-                table: "Properties",
12
-                nullable: true);
13
-
14
-            migrationBuilder.AddColumn<string>(
15
-                name: "VirtualTour",
16
-                table: "Properties",
17
-                nullable: true);
18
-        }
19
-
20
-        protected override void Down(MigrationBuilder migrationBuilder)
21
-        {
22
-            migrationBuilder.DropColumn(
23
-                name: "Video",
24
-                table: "Properties");
25
-
26
-            migrationBuilder.DropColumn(
27
-                name: "VirtualTour",
28
-                table: "Properties");
29
-        }
30
-    }
31
-}

+ 0
- 1233
UnivateProperties_API/Migrations/20191021143440_MappingBank.Designer.cs
Diff onderdrukt omdat het te groot bestand
Bestand weergeven


+ 0
- 128
UnivateProperties_API/Migrations/20191021143440_MappingBank.cs Bestand weergeven

@@ -1,128 +0,0 @@
1
-using Microsoft.EntityFrameworkCore.Migrations;
2
-
3
-namespace UnivateProperties_API.Migrations
4
-{
5
-    public partial class MappingBank : Migration
6
-    {
7
-        protected override void Up(MigrationBuilder migrationBuilder)
8
-        {
9
-            migrationBuilder.DropForeignKey(
10
-                name: "FK_BankAccounts_Banks_BankId",
11
-                table: "BankAccounts");
12
-
13
-            //migrationBuilder.AddColumn<string>(
14
-            //    name: "Video",
15
-            //    table: "Properties",
16
-            //    nullable: true);
17
-
18
-            //migrationBuilder.AddColumn<string>(
19
-            //    name: "VirtualTour",
20
-            //    table: "Properties",
21
-            //    nullable: true);
22
-
23
-            migrationBuilder.AddColumn<int>(
24
-                name: "BankAccountId",
25
-                table: "Individuals",
26
-                nullable: true);
27
-
28
-            migrationBuilder.AlterColumn<int>(
29
-                name: "BankId",
30
-                table: "BankAccounts",
31
-                nullable: true,
32
-                oldClrType: typeof(int));
33
-
34
-            migrationBuilder.AddColumn<int>(
35
-                name: "OwnerId",
36
-                table: "Addresses",
37
-                nullable: true);
38
-
39
-            migrationBuilder.CreateIndex(
40
-                name: "IX_Individuals_BankAccountId",
41
-                table: "Individuals",
42
-                column: "BankAccountId");
43
-
44
-            migrationBuilder.CreateIndex(
45
-                name: "IX_Addresses_OwnerId",
46
-                table: "Addresses",
47
-                column: "OwnerId");
48
-
49
-            migrationBuilder.AddForeignKey(
50
-                name: "FK_Addresses_Individuals_OwnerId",
51
-                table: "Addresses",
52
-                column: "OwnerId",
53
-                principalTable: "Individuals",
54
-                principalColumn: "Id",
55
-                onDelete: ReferentialAction.Restrict);
56
-
57
-            migrationBuilder.AddForeignKey(
58
-                name: "FK_BankAccounts_Banks_BankId",
59
-                table: "BankAccounts",
60
-                column: "BankId",
61
-                principalTable: "Banks",
62
-                principalColumn: "Id",
63
-                onDelete: ReferentialAction.Restrict);
64
-
65
-            migrationBuilder.AddForeignKey(
66
-                name: "FK_Individuals_BankAccounts_BankAccountId",
67
-                table: "Individuals",
68
-                column: "BankAccountId",
69
-                principalTable: "BankAccounts",
70
-                principalColumn: "Id",
71
-                onDelete: ReferentialAction.Restrict);
72
-        }
73
-
74
-        protected override void Down(MigrationBuilder migrationBuilder)
75
-        {
76
-            migrationBuilder.DropForeignKey(
77
-                name: "FK_Addresses_Individuals_OwnerId",
78
-                table: "Addresses");
79
-
80
-            migrationBuilder.DropForeignKey(
81
-                name: "FK_BankAccounts_Banks_BankId",
82
-                table: "BankAccounts");
83
-
84
-            migrationBuilder.DropForeignKey(
85
-                name: "FK_Individuals_BankAccounts_BankAccountId",
86
-                table: "Individuals");
87
-
88
-            migrationBuilder.DropIndex(
89
-                name: "IX_Individuals_BankAccountId",
90
-                table: "Individuals");
91
-
92
-            migrationBuilder.DropIndex(
93
-                name: "IX_Addresses_OwnerId",
94
-                table: "Addresses");
95
-
96
-            //migrationBuilder.DropColumn(
97
-            //    name: "Video",
98
-            //    table: "Properties");
99
-
100
-            //migrationBuilder.DropColumn(
101
-            //    name: "VirtualTour",
102
-            //    table: "Properties");
103
-
104
-            migrationBuilder.DropColumn(
105
-                name: "BankAccountId",
106
-                table: "Individuals");
107
-
108
-            migrationBuilder.DropColumn(
109
-                name: "OwnerId",
110
-                table: "Addresses");
111
-
112
-            migrationBuilder.AlterColumn<int>(
113
-                name: "BankId",
114
-                table: "BankAccounts",
115
-                nullable: false,
116
-                oldClrType: typeof(int),
117
-                oldNullable: true);
118
-
119
-            migrationBuilder.AddForeignKey(
120
-                name: "FK_BankAccounts_Banks_BankId",
121
-                table: "BankAccounts",
122
-                column: "BankId",
123
-                principalTable: "Banks",
124
-                principalColumn: "Id",
125
-                onDelete: ReferentialAction.Cascade);
126
-        }
127
-    }
128
-}

+ 0
- 1239
UnivateProperties_API/Migrations/20191022055635_AddedWeekProps.Designer.cs
Diff onderdrukt omdat het te groot bestand
Bestand weergeven


+ 0
- 41
UnivateProperties_API/Migrations/20191022055635_AddedWeekProps.cs Bestand weergeven

@@ -1,41 +0,0 @@
1
-using Microsoft.EntityFrameworkCore.Migrations;
2
-
3
-namespace UnivateProperties_API.Migrations
4
-{
5
-    public partial class AddedWeekProps : Migration
6
-    {
7
-        protected override void Up(MigrationBuilder migrationBuilder)
8
-        {
9
-            migrationBuilder.AddColumn<double>(
10
-                name: "AgentCommision",
11
-                table: "Weeks",
12
-                nullable: false,
13
-                defaultValue: 0.0);
14
-
15
-            migrationBuilder.AddColumn<string>(
16
-                name: "Mandate",
17
-                table: "Weeks",
18
-                nullable: true);
19
-
20
-            migrationBuilder.AddColumn<string>(
21
-                name: "OtherResortName",
22
-                table: "Weeks",
23
-                nullable: true);
24
-        }
25
-
26
-        protected override void Down(MigrationBuilder migrationBuilder)
27
-        {
28
-            migrationBuilder.DropColumn(
29
-                name: "AgentCommision",
30
-                table: "Weeks");
31
-
32
-            migrationBuilder.DropColumn(
33
-                name: "Mandate",
34
-                table: "Weeks");
35
-
36
-            migrationBuilder.DropColumn(
37
-                name: "OtherResortName",
38
-                table: "Weeks");
39
-        }
40
-    }
41
-}

+ 0
- 1241
UnivateProperties_API/Migrations/20191031084836_Carousel Stuff.Designer.cs
Diff onderdrukt omdat het te groot bestand
Bestand weergeven


+ 0
- 38
UnivateProperties_API/Migrations/20191031084836_Carousel Stuff.cs Bestand weergeven

@@ -1,38 +0,0 @@
1
-using System;
2
-using Microsoft.EntityFrameworkCore.Migrations;
3
-using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
4
-
5
-namespace UnivateProperties_API.Migrations
6
-{
7
-    public partial class CarouselStuff : Migration
8
-    {
9
-        protected override void Up(MigrationBuilder migrationBuilder)
10
-        {
11
-            migrationBuilder.CreateTable(
12
-                name: "Carousel",
13
-                columns: table => new
14
-                {
15
-                    Id = table.Column<int>(nullable: false)
16
-                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
17
-                    Created = table.Column<DateTime>(nullable: false),
18
-                    Modified = table.Column<DateTime>(nullable: false),
19
-                    ModifiedBy = table.Column<string>(nullable: true),
20
-                    IsDeleted = table.Column<bool>(nullable: false),
21
-                    PropertyId = table.Column<int>(nullable: false),
22
-                    TimeshareId = table.Column<int>(nullable: false),
23
-                    Header = table.Column<string>(nullable: true),
24
-                    Image = table.Column<string>(nullable: true)
25
-                },
26
-                constraints: table =>
27
-                {
28
-                    table.PrimaryKey("PK_Carousel", x => x.Id);
29
-                });
30
-        }
31
-
32
-        protected override void Down(MigrationBuilder migrationBuilder)
33
-        {
34
-            migrationBuilder.DropTable(
35
-                name: "Carousel");
36
-        }
37
-    }
38
-}

+ 0
- 1294
UnivateProperties_API/Migrations/20191112124547_templateMod.Designer.cs
Diff onderdrukt omdat het te groot bestand
Bestand weergeven


+ 0
- 113
UnivateProperties_API/Migrations/20191112124547_templateMod.cs Bestand weergeven

@@ -1,113 +0,0 @@
1
-using Microsoft.EntityFrameworkCore.Migrations;
2
-
3
-namespace UnivateProperties_API.Migrations
4
-{
5
-    public partial class templateMod : Migration
6
-    {
7
-        protected override void Up(MigrationBuilder migrationBuilder)
8
-        {
9
-            migrationBuilder.AddColumn<int>(
10
-                name: "SenderId",
11
-                table: "Templates",
12
-                nullable: true);
13
-
14
-            migrationBuilder.AddColumn<int>(
15
-                name: "TemplateId",
16
-                table: "Individuals",
17
-                nullable: true);
18
-
19
-            migrationBuilder.AddColumn<int>(
20
-                name: "TemplateId",
21
-                table: "Agents",
22
-                nullable: true);
23
-
24
-            migrationBuilder.AddColumn<bool>(
25
-                name: "Default",
26
-                table: "Accounts",
27
-                nullable: false,
28
-                defaultValue: false);
29
-
30
-            migrationBuilder.CreateIndex(
31
-                name: "IX_Templates_SenderId",
32
-                table: "Templates",
33
-                column: "SenderId");
34
-
35
-            migrationBuilder.CreateIndex(
36
-                name: "IX_Individuals_TemplateId",
37
-                table: "Individuals",
38
-                column: "TemplateId");
39
-
40
-            migrationBuilder.CreateIndex(
41
-                name: "IX_Agents_TemplateId",
42
-                table: "Agents",
43
-                column: "TemplateId");
44
-
45
-            migrationBuilder.AddForeignKey(
46
-                name: "FK_Agents_Templates_TemplateId",
47
-                table: "Agents",
48
-                column: "TemplateId",
49
-                principalTable: "Templates",
50
-                principalColumn: "Id",
51
-                onDelete: ReferentialAction.Restrict);
52
-
53
-            migrationBuilder.AddForeignKey(
54
-                name: "FK_Individuals_Templates_TemplateId",
55
-                table: "Individuals",
56
-                column: "TemplateId",
57
-                principalTable: "Templates",
58
-                principalColumn: "Id",
59
-                onDelete: ReferentialAction.Restrict);
60
-
61
-            migrationBuilder.AddForeignKey(
62
-                name: "FK_Templates_Accounts_SenderId",
63
-                table: "Templates",
64
-                column: "SenderId",
65
-                principalTable: "Accounts",
66
-                principalColumn: "Id",
67
-                onDelete: ReferentialAction.Restrict);
68
-        }
69
-
70
-        protected override void Down(MigrationBuilder migrationBuilder)
71
-        {
72
-            migrationBuilder.DropForeignKey(
73
-                name: "FK_Agents_Templates_TemplateId",
74
-                table: "Agents");
75
-
76
-            migrationBuilder.DropForeignKey(
77
-                name: "FK_Individuals_Templates_TemplateId",
78
-                table: "Individuals");
79
-
80
-            migrationBuilder.DropForeignKey(
81
-                name: "FK_Templates_Accounts_SenderId",
82
-                table: "Templates");
83
-
84
-            migrationBuilder.DropIndex(
85
-                name: "IX_Templates_SenderId",
86
-                table: "Templates");
87
-
88
-            migrationBuilder.DropIndex(
89
-                name: "IX_Individuals_TemplateId",
90
-                table: "Individuals");
91
-
92
-            migrationBuilder.DropIndex(
93
-                name: "IX_Agents_TemplateId",
94
-                table: "Agents");
95
-
96
-            migrationBuilder.DropColumn(
97
-                name: "SenderId",
98
-                table: "Templates");
99
-
100
-            migrationBuilder.DropColumn(
101
-                name: "TemplateId",
102
-                table: "Individuals");
103
-
104
-            migrationBuilder.DropColumn(
105
-                name: "TemplateId",
106
-                table: "Agents");
107
-
108
-            migrationBuilder.DropColumn(
109
-                name: "Default",
110
-                table: "Accounts");
111
-        }
112
-    }
113
-}

+ 0
- 549
UnivateProperties_API/Migrations/20200107112926_test.cs Bestand weergeven

@@ -1,549 +0,0 @@
1
-using Microsoft.EntityFrameworkCore.Metadata;
2
-using Microsoft.EntityFrameworkCore.Migrations;
3
-
4
-namespace UnivateProperties_API.Migrations
5
-{
6
-    public partial class test : Migration
7
-    {
8
-        protected override void Up(MigrationBuilder migrationBuilder)
9
-        {
10
-            migrationBuilder.DropForeignKey(
11
-                name: "FK_UnitConfigurationTypes_UnitConfigurations_UnitConfiguration~",
12
-                table: "UnitConfigurationTypes");
13
-
14
-            //migrationBuilder.DropIndex(
15
-            //    name: "IX_Users_Username",
16
-            //    table: "Users");
17
-
18
-            migrationBuilder.DropIndex(
19
-                name: "IX_UnitConfigurations_Code",
20
-                table: "UnitConfigurations");
21
-
22
-            //migrationBuilder.DropIndex(
23
-            //    name: "IX_Individuals_Telephone_CellNumber_Email",
24
-            //    table: "Individuals");
25
-
26
-            migrationBuilder.AlterColumn<int>(
27
-                name: "Id",
28
-                table: "Weeks",
29
-                nullable: false,
30
-                oldClrType: typeof(int))
31
-                .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
32
-
33
-            migrationBuilder.AlterColumn<int>(
34
-                name: "Id",
35
-                table: "Users",
36
-                nullable: false,
37
-                oldClrType: typeof(int))
38
-                .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
39
-
40
-            migrationBuilder.AlterColumn<int>(
41
-                name: "Id",
42
-                table: "UserDefinedGroups",
43
-                nullable: false,
44
-                oldClrType: typeof(int))
45
-                .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
46
-
47
-            migrationBuilder.AlterColumn<int>(
48
-                name: "Id",
49
-                table: "UserDefinedFields",
50
-                nullable: false,
51
-                oldClrType: typeof(int))
52
-                .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
53
-
54
-            migrationBuilder.AlterColumn<int>(
55
-                name: "Id",
56
-                table: "UnitConfigurationTypes",
57
-                nullable: false,
58
-                oldClrType: typeof(int))
59
-                .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
60
-
61
-            migrationBuilder.AlterColumn<int>(
62
-                name: "Id",
63
-                table: "UnitConfigurations",
64
-                nullable: false,
65
-                oldClrType: typeof(int))
66
-                .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
67
-
68
-            migrationBuilder.AlterColumn<int>(
69
-                name: "Id",
70
-                table: "Templates",
71
-                nullable: false,
72
-                oldClrType: typeof(int))
73
-                .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
74
-
75
-            migrationBuilder.AlterColumn<int>(
76
-                name: "Id",
77
-                table: "Suburbs",
78
-                nullable: false,
79
-                oldClrType: typeof(int))
80
-                .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
81
-
82
-            migrationBuilder.AlterColumn<int>(
83
-                name: "Id",
84
-                table: "Status",
85
-                nullable: false,
86
-                oldClrType: typeof(int))
87
-                .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
88
-
89
-            migrationBuilder.AlterColumn<int>(
90
-                name: "Id",
91
-                table: "Seasons",
92
-                nullable: false,
93
-                oldClrType: typeof(int))
94
-                .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
95
-
96
-            migrationBuilder.AlterColumn<int>(
97
-                name: "Id",
98
-                table: "SearchLogs",
99
-                nullable: false,
100
-                oldClrType: typeof(int))
101
-                .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
102
-
103
-            migrationBuilder.AlterColumn<int>(
104
-                name: "Id",
105
-                table: "Provinces",
106
-                nullable: false,
107
-                oldClrType: typeof(int))
108
-                .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
109
-
110
-            migrationBuilder.AlterColumn<int>(
111
-                name: "Id",
112
-                table: "PropertyUserFields",
113
-                nullable: false,
114
-                oldClrType: typeof(int))
115
-                .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
116
-
117
-            migrationBuilder.AlterColumn<int>(
118
-                name: "Id",
119
-                table: "PropertyTypes",
120
-                nullable: false,
121
-                oldClrType: typeof(int))
122
-                .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
123
-
124
-            migrationBuilder.AlterColumn<int>(
125
-                name: "Id",
126
-                table: "PropertyImages",
127
-                nullable: false,
128
-                oldClrType: typeof(int))
129
-                .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
130
-
131
-            migrationBuilder.AlterColumn<int>(
132
-                name: "Id",
133
-                table: "Properties",
134
-                nullable: false,
135
-                oldClrType: typeof(int))
136
-                .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
137
-
138
-            migrationBuilder.AlterColumn<int>(
139
-                name: "Id",
140
-                table: "ProcessFlows",
141
-                nullable: false,
142
-                oldClrType: typeof(int))
143
-                .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
144
-
145
-            migrationBuilder.AlterColumn<int>(
146
-                name: "Id",
147
-                table: "PlaceHolders",
148
-                nullable: false,
149
-                oldClrType: typeof(int))
150
-                .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
151
-
152
-            migrationBuilder.AlterColumn<int>(
153
-                name: "Id",
154
-                table: "Person",
155
-                nullable: false,
156
-                oldClrType: typeof(int))
157
-                .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
158
-
159
-            migrationBuilder.AlterColumn<int>(
160
-                name: "Id",
161
-                table: "Location",
162
-                nullable: false,
163
-                oldClrType: typeof(int))
164
-                .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
165
-
166
-            migrationBuilder.AlterColumn<int>(
167
-                name: "Id",
168
-                table: "Individuals",
169
-                nullable: false,
170
-                oldClrType: typeof(int))
171
-                .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
172
-
173
-            migrationBuilder.AlterColumn<int>(
174
-                name: "Id",
175
-                table: "Hosts",
176
-                nullable: false,
177
-                oldClrType: typeof(int))
178
-                .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
179
-
180
-            migrationBuilder.AlterColumn<int>(
181
-                name: "Id",
182
-                table: "Emails",
183
-                nullable: false,
184
-                oldClrType: typeof(int))
185
-                .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
186
-
187
-            migrationBuilder.AlterColumn<int>(
188
-                name: "Id",
189
-                table: "Cities",
190
-                nullable: false,
191
-                oldClrType: typeof(int))
192
-                .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
193
-
194
-            migrationBuilder.AlterColumn<int>(
195
-                name: "Id",
196
-                table: "Carousel",
197
-                nullable: false,
198
-                oldClrType: typeof(int))
199
-                .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
200
-
201
-            migrationBuilder.AlterColumn<int>(
202
-                name: "Id",
203
-                table: "BidItems",
204
-                nullable: false,
205
-                oldClrType: typeof(int))
206
-                .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
207
-
208
-            migrationBuilder.AlterColumn<int>(
209
-                name: "Id",
210
-                table: "Banks",
211
-                nullable: false,
212
-                oldClrType: typeof(int))
213
-                .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
214
-
215
-            migrationBuilder.AlterColumn<int>(
216
-                name: "Id",
217
-                table: "BankAccounts",
218
-                nullable: false,
219
-                oldClrType: typeof(int))
220
-                .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
221
-
222
-            migrationBuilder.AlterColumn<int>(
223
-                name: "Id",
224
-                table: "Agents",
225
-                nullable: false,
226
-                oldClrType: typeof(int))
227
-                .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
228
-
229
-            migrationBuilder.AlterColumn<int>(
230
-                name: "Id",
231
-                table: "Agencies",
232
-                nullable: false,
233
-                oldClrType: typeof(int))
234
-                .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
235
-
236
-            migrationBuilder.AlterColumn<int>(
237
-                name: "Id",
238
-                table: "Addresses",
239
-                nullable: false,
240
-                oldClrType: typeof(int))
241
-                .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
242
-
243
-            migrationBuilder.AlterColumn<int>(
244
-                name: "Id",
245
-                table: "Accounts",
246
-                nullable: false,
247
-                oldClrType: typeof(int))
248
-                .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
249
-
250
-            //migrationBuilder.CreateIndex(
251
-            //    name: "IX_Users_Username",
252
-            //    table: "Users",
253
-            //    column: "Username",
254
-            //    unique: true,
255
-            //    filter: "[Username] IS NOT NULL");
256
-
257
-            //migrationBuilder.CreateIndex(
258
-            //    name: "IX_UnitConfigurations_Code",
259
-            //    table: "UnitConfigurations",
260
-            //    column: "Code",
261
-            //    unique: true,
262
-            //    filter: "[Code] IS NOT NULL");
263
-
264
-            //migrationBuilder.CreateIndex(
265
-            //    name: "IX_Individuals_Telephone_CellNumber_Email",
266
-            //    table: "Individuals",
267
-            //    columns: new[] { "Telephone", "CellNumber", "Email" },
268
-            //    unique: true,
269
-            //    filter: "[Telephone] IS NOT NULL AND [CellNumber] IS NOT NULL AND [Email] IS NOT NULL");
270
-
271
-            migrationBuilder.AddForeignKey(
272
-                name: "FK_UnitConfigurationTypes_UnitConfigurations_UnitConfigurationId",
273
-                table: "UnitConfigurationTypes",
274
-                column: "UnitConfigurationId",
275
-                principalTable: "UnitConfigurations",
276
-                principalColumn: "Id",
277
-                onDelete: ReferentialAction.Cascade);
278
-        }
279
-
280
-        protected override void Down(MigrationBuilder migrationBuilder)
281
-        {
282
-            migrationBuilder.DropForeignKey(
283
-                name: "FK_UnitConfigurationTypes_UnitConfigurations_UnitConfigurationId",
284
-                table: "UnitConfigurationTypes");
285
-
286
-            //migrationBuilder.DropIndex(
287
-            //    name: "IX_Users_Username",
288
-            //    table: "Users");
289
-
290
-            //migrationBuilder.DropIndex(
291
-            //    name: "IX_UnitConfigurations_Code",
292
-            //    table: "UnitConfigurations");
293
-
294
-            //migrationBuilder.DropIndex(
295
-            //    name: "IX_Individuals_Telephone_CellNumber_Email",
296
-            //    table: "Individuals");
297
-
298
-            migrationBuilder.AlterColumn<int>(
299
-                name: "Id",
300
-                table: "Weeks",
301
-                nullable: false,
302
-                oldClrType: typeof(int))
303
-                .OldAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
304
-
305
-            migrationBuilder.AlterColumn<int>(
306
-                name: "Id",
307
-                table: "Users",
308
-                nullable: false,
309
-                oldClrType: typeof(int))
310
-                .OldAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
311
-
312
-            migrationBuilder.AlterColumn<int>(
313
-                name: "Id",
314
-                table: "UserDefinedGroups",
315
-                nullable: false,
316
-                oldClrType: typeof(int))
317
-                .OldAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
318
-
319
-            migrationBuilder.AlterColumn<int>(
320
-                name: "Id",
321
-                table: "UserDefinedFields",
322
-                nullable: false,
323
-                oldClrType: typeof(int))
324
-                .OldAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
325
-
326
-            migrationBuilder.AlterColumn<int>(
327
-                name: "Id",
328
-                table: "UnitConfigurationTypes",
329
-                nullable: false,
330
-                oldClrType: typeof(int))
331
-                .OldAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
332
-
333
-            migrationBuilder.AlterColumn<int>(
334
-                name: "Id",
335
-                table: "UnitConfigurations",
336
-                nullable: false,
337
-                oldClrType: typeof(int))
338
-                .OldAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
339
-
340
-            migrationBuilder.AlterColumn<int>(
341
-                name: "Id",
342
-                table: "Templates",
343
-                nullable: false,
344
-                oldClrType: typeof(int))
345
-                .OldAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
346
-
347
-            migrationBuilder.AlterColumn<int>(
348
-                name: "Id",
349
-                table: "Suburbs",
350
-                nullable: false,
351
-                oldClrType: typeof(int))
352
-                .OldAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
353
-
354
-            migrationBuilder.AlterColumn<int>(
355
-                name: "Id",
356
-                table: "Status",
357
-                nullable: false,
358
-                oldClrType: typeof(int))
359
-                .OldAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
360
-
361
-            migrationBuilder.AlterColumn<int>(
362
-                name: "Id",
363
-                table: "Seasons",
364
-                nullable: false,
365
-                oldClrType: typeof(int))
366
-                .OldAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
367
-
368
-            migrationBuilder.AlterColumn<int>(
369
-                name: "Id",
370
-                table: "SearchLogs",
371
-                nullable: false,
372
-                oldClrType: typeof(int))
373
-                .OldAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
374
-
375
-            migrationBuilder.AlterColumn<int>(
376
-                name: "Id",
377
-                table: "Provinces",
378
-                nullable: false,
379
-                oldClrType: typeof(int))
380
-                .OldAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
381
-
382
-            migrationBuilder.AlterColumn<int>(
383
-                name: "Id",
384
-                table: "PropertyUserFields",
385
-                nullable: false,
386
-                oldClrType: typeof(int))
387
-                .OldAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
388
-
389
-            migrationBuilder.AlterColumn<int>(
390
-                name: "Id",
391
-                table: "PropertyTypes",
392
-                nullable: false,
393
-                oldClrType: typeof(int))
394
-                .OldAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
395
-
396
-            migrationBuilder.AlterColumn<int>(
397
-                name: "Id",
398
-                table: "PropertyImages",
399
-                nullable: false,
400
-                oldClrType: typeof(int))
401
-                .OldAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
402
-
403
-            migrationBuilder.AlterColumn<int>(
404
-                name: "Id",
405
-                table: "Properties",
406
-                nullable: false,
407
-                oldClrType: typeof(int))
408
-                .OldAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
409
-
410
-            migrationBuilder.AlterColumn<int>(
411
-                name: "Id",
412
-                table: "ProcessFlows",
413
-                nullable: false,
414
-                oldClrType: typeof(int))
415
-                .OldAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
416
-
417
-            migrationBuilder.AlterColumn<int>(
418
-                name: "Id",
419
-                table: "PlaceHolders",
420
-                nullable: false,
421
-                oldClrType: typeof(int))
422
-                .OldAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
423
-
424
-            migrationBuilder.AlterColumn<int>(
425
-                name: "Id",
426
-                table: "Person",
427
-                nullable: false,
428
-                oldClrType: typeof(int))
429
-                .OldAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
430
-
431
-            migrationBuilder.AlterColumn<int>(
432
-                name: "Id",
433
-                table: "Location",
434
-                nullable: false,
435
-                oldClrType: typeof(int))
436
-                .OldAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
437
-
438
-            migrationBuilder.AlterColumn<int>(
439
-                name: "Id",
440
-                table: "Individuals",
441
-                nullable: false,
442
-                oldClrType: typeof(int))
443
-                .OldAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
444
-
445
-            migrationBuilder.AlterColumn<int>(
446
-                name: "Id",
447
-                table: "Hosts",
448
-                nullable: false,
449
-                oldClrType: typeof(int))
450
-                .OldAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
451
-
452
-            migrationBuilder.AlterColumn<int>(
453
-                name: "Id",
454
-                table: "Emails",
455
-                nullable: false,
456
-                oldClrType: typeof(int))
457
-                .OldAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
458
-
459
-            migrationBuilder.AlterColumn<int>(
460
-                name: "Id",
461
-                table: "Cities",
462
-                nullable: false,
463
-                oldClrType: typeof(int))
464
-                .OldAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
465
-
466
-            migrationBuilder.AlterColumn<int>(
467
-                name: "Id",
468
-                table: "Carousel",
469
-                nullable: false,
470
-                oldClrType: typeof(int))
471
-                .OldAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
472
-
473
-            migrationBuilder.AlterColumn<int>(
474
-                name: "Id",
475
-                table: "BidItems",
476
-                nullable: false,
477
-                oldClrType: typeof(int))
478
-                .OldAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
479
-
480
-            migrationBuilder.AlterColumn<int>(
481
-                name: "Id",
482
-                table: "Banks",
483
-                nullable: false,
484
-                oldClrType: typeof(int))
485
-                .OldAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
486
-
487
-            migrationBuilder.AlterColumn<int>(
488
-                name: "Id",
489
-                table: "BankAccounts",
490
-                nullable: false,
491
-                oldClrType: typeof(int))
492
-                .OldAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
493
-
494
-            migrationBuilder.AlterColumn<int>(
495
-                name: "Id",
496
-                table: "Agents",
497
-                nullable: false,
498
-                oldClrType: typeof(int))
499
-                .OldAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
500
-
501
-            migrationBuilder.AlterColumn<int>(
502
-                name: "Id",
503
-                table: "Agencies",
504
-                nullable: false,
505
-                oldClrType: typeof(int))
506
-                .OldAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
507
-
508
-            migrationBuilder.AlterColumn<int>(
509
-                name: "Id",
510
-                table: "Addresses",
511
-                nullable: false,
512
-                oldClrType: typeof(int))
513
-                .OldAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
514
-
515
-            migrationBuilder.AlterColumn<int>(
516
-                name: "Id",
517
-                table: "Accounts",
518
-                nullable: false,
519
-                oldClrType: typeof(int))
520
-                .OldAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
521
-
522
-            //migrationBuilder.CreateIndex(
523
-            //    name: "IX_Users_Username",
524
-            //    table: "Users",
525
-            //    column: "Username",
526
-            //    unique: true);
527
-
528
-            migrationBuilder.CreateIndex(
529
-                name: "IX_UnitConfigurations_Code",
530
-                table: "UnitConfigurations",
531
-                column: "Code",
532
-                unique: true);
533
-
534
-            migrationBuilder.CreateIndex(
535
-                name: "IX_Individuals_Telephone_CellNumber_Email",
536
-                table: "Individuals",
537
-                columns: new[] { "Telephone", "CellNumber", "Email" },
538
-                unique: true);
539
-
540
-            migrationBuilder.AddForeignKey(
541
-                name: "FK_UnitConfigurationTypes_UnitConfigurations_UnitConfiguration~",
542
-                table: "UnitConfigurationTypes",
543
-                column: "UnitConfigurationId",
544
-                principalTable: "UnitConfigurations",
545
-                principalColumn: "Id",
546
-                onDelete: ReferentialAction.Cascade);
547
-        }
548
-    }
549
-}

+ 0
- 1298
UnivateProperties_API/Migrations/20200121092345_MissingColumns.Designer.cs
Diff onderdrukt omdat het te groot bestand
Bestand weergeven


+ 0
- 569
UnivateProperties_API/Migrations/20200121092345_MissingColumns.cs Bestand weergeven

@@ -1,569 +0,0 @@
1
-using System;
2
-using Microsoft.EntityFrameworkCore.Migrations;
3
-using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
4
-
5
-namespace UnivateProperties_API.Migrations
6
-{
7
-    public partial class MissingColumns : Migration
8
-    {
9
-        protected override void Up(MigrationBuilder migrationBuilder)
10
-        {
11
-            migrationBuilder.DropForeignKey(
12
-                name: "FK_UnitConfigurationTypes_UnitConfigurations_UnitConfigurationId",
13
-                table: "UnitConfigurationTypes");
14
-
15
-            //migrationBuilder.DropIndex(
16
-            //    name: "IX_Users_Username",
17
-            //    table: "Users");
18
-
19
-            //migrationBuilder.DropIndex(
20
-            //    name: "IX_UnitConfigurations_Code",
21
-            //    table: "UnitConfigurations");
22
-
23
-            //migrationBuilder.DropIndex(
24
-            //    name: "IX_Individuals_Telephone_CellNumber_Email",
25
-            //    table: "Individuals");
26
-
27
-            //migrationBuilder.AlterColumn<int>(
28
-            //    name: "Id",
29
-            //    table: "Weeks",
30
-            //    nullable: false,
31
-            //    oldClrType: typeof(int))
32
-            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
33
-
34
-            //migrationBuilder.AlterColumn<int>(
35
-            //    name: "Id",
36
-            //    table: "Users",
37
-            //    nullable: false,
38
-            //    oldClrType: typeof(int))
39
-            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
40
-
41
-            //migrationBuilder.AlterColumn<int>(
42
-            //    name: "Id",
43
-            //    table: "UserDefinedGroups",
44
-            //    nullable: false,
45
-            //    oldClrType: typeof(int))
46
-            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
47
-
48
-            //migrationBuilder.AlterColumn<int>(
49
-            //    name: "Id",
50
-            //    table: "UserDefinedFields",
51
-            //    nullable: false,
52
-            //    oldClrType: typeof(int))
53
-            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
54
-
55
-            //migrationBuilder.AlterColumn<int>(
56
-            //    name: "Id",
57
-            //    table: "UnitConfigurationTypes",
58
-            //    nullable: false,
59
-            //    oldClrType: typeof(int))
60
-            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
61
-
62
-            //migrationBuilder.AlterColumn<int>(
63
-            //    name: "Id",
64
-            //    table: "UnitConfigurations",
65
-            //    nullable: false,
66
-            //    oldClrType: typeof(int))
67
-            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
68
-
69
-            //migrationBuilder.AlterColumn<int>(
70
-            //    name: "Id",
71
-            //    table: "Templates",
72
-            //    nullable: false,
73
-            //    oldClrType: typeof(int))
74
-            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
75
-
76
-            //migrationBuilder.AlterColumn<int>(
77
-            //    name: "Id",
78
-            //    table: "Suburbs",
79
-            //    nullable: false,
80
-            //    oldClrType: typeof(int))
81
-            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
82
-
83
-            //migrationBuilder.AlterColumn<int>(
84
-            //    name: "Id",
85
-            //    table: "Status",
86
-            //    nullable: false,
87
-            //    oldClrType: typeof(int))
88
-            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
89
-
90
-            //migrationBuilder.AlterColumn<int>(
91
-            //    name: "Id",
92
-            //    table: "Seasons",
93
-            //    nullable: false,
94
-            //    oldClrType: typeof(int))
95
-            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
96
-
97
-            //migrationBuilder.AlterColumn<int>(
98
-            //    name: "Id",
99
-            //    table: "SearchLogs",
100
-            //    nullable: false,
101
-            //    oldClrType: typeof(int))
102
-            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
103
-
104
-            //migrationBuilder.AlterColumn<int>(
105
-            //    name: "Id",
106
-            //    table: "Provinces",
107
-            //    nullable: false,
108
-            //    oldClrType: typeof(int))
109
-            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
110
-
111
-            //migrationBuilder.AlterColumn<int>(
112
-            //    name: "Id",
113
-            //    table: "PropertyUserFields",
114
-            //    nullable: false,
115
-            //    oldClrType: typeof(int))
116
-            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
117
-
118
-            //migrationBuilder.AlterColumn<int>(
119
-            //    name: "Id",
120
-            //    table: "PropertyTypes",
121
-            //    nullable: false,
122
-            //    oldClrType: typeof(int))
123
-            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
124
-
125
-            //migrationBuilder.AlterColumn<int>(
126
-            //    name: "Id",
127
-            //    table: "PropertyImages",
128
-            //    nullable: false,
129
-            //    oldClrType: typeof(int))
130
-            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
131
-
132
-            //migrationBuilder.AlterColumn<int>(
133
-            //    name: "Id",
134
-            //    table: "Properties",
135
-            //    nullable: false,
136
-            //    oldClrType: typeof(int))
137
-            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
138
-
139
-            migrationBuilder.AddColumn<DateTime>(
140
-                name: "DateAvailable",
141
-                table: "Properties",
142
-                nullable: false,
143
-                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
144
-
145
-            //migrationBuilder.AlterColumn<int>(
146
-            //    name: "Id",
147
-            //    table: "ProcessFlows",
148
-            //    nullable: false,
149
-            //    oldClrType: typeof(int))
150
-            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
151
-
152
-            //migrationBuilder.AlterColumn<int>(
153
-            //    name: "Id",
154
-            //    table: "PlaceHolders",
155
-            //    nullable: false,
156
-            //    oldClrType: typeof(int))
157
-            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
158
-
159
-            //migrationBuilder.AlterColumn<int>(
160
-            //    name: "Id",
161
-            //    table: "Person",
162
-            //    nullable: false,
163
-            //    oldClrType: typeof(int))
164
-            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
165
-
166
-            //migrationBuilder.AlterColumn<int>(
167
-            //    name: "Id",
168
-            //    table: "Location",
169
-            //    nullable: false,
170
-            //    oldClrType: typeof(int))
171
-            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
172
-
173
-            //migrationBuilder.AlterColumn<int>(
174
-            //    name: "Id",
175
-            //    table: "Individuals",
176
-            //    nullable: false,
177
-            //    oldClrType: typeof(int))
178
-            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
179
-
180
-            //migrationBuilder.AlterColumn<int>(
181
-            //    name: "Id",
182
-            //    table: "Hosts",
183
-            //    nullable: false,
184
-            //    oldClrType: typeof(int))
185
-            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
186
-
187
-            //migrationBuilder.AlterColumn<int>(
188
-            //    name: "Id",
189
-            //    table: "Emails",
190
-            //    nullable: false,
191
-            //    oldClrType: typeof(int))
192
-            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
193
-
194
-            //migrationBuilder.AlterColumn<int>(
195
-            //    name: "Id",
196
-            //    table: "Cities",
197
-            //    nullable: false,
198
-            //    oldClrType: typeof(int))
199
-            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
200
-
201
-            //migrationBuilder.AlterColumn<int>(
202
-            //    name: "Id",
203
-            //    table: "Carousel",
204
-            //    nullable: false,
205
-            //    oldClrType: typeof(int))
206
-            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
207
-
208
-            //migrationBuilder.AlterColumn<int>(
209
-            //    name: "Id",
210
-            //    table: "BidItems",
211
-            //    nullable: false,
212
-            //    oldClrType: typeof(int))
213
-            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
214
-
215
-            //migrationBuilder.AlterColumn<int>(
216
-            //    name: "Id",
217
-            //    table: "Banks",
218
-            //    nullable: false,
219
-            //    oldClrType: typeof(int))
220
-            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
221
-
222
-            //migrationBuilder.AlterColumn<int>(
223
-            //    name: "Id",
224
-            //    table: "BankAccounts",
225
-            //    nullable: false,
226
-            //    oldClrType: typeof(int))
227
-            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
228
-
229
-            //migrationBuilder.AlterColumn<int>(
230
-            //    name: "Id",
231
-            //    table: "Agents",
232
-            //    nullable: false,
233
-            //    oldClrType: typeof(int))
234
-            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
235
-
236
-            //migrationBuilder.AlterColumn<int>(
237
-            //    name: "Id",
238
-            //    table: "Agencies",
239
-            //    nullable: false,
240
-            //    oldClrType: typeof(int))
241
-            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
242
-
243
-            //migrationBuilder.AlterColumn<int>(
244
-            //    name: "Id",
245
-            //    table: "Addresses",
246
-            //    nullable: false,
247
-            //    oldClrType: typeof(int))
248
-            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
249
-
250
-            migrationBuilder.AddColumn<string>(
251
-                name: "Province",
252
-                table: "Addresses",
253
-                nullable: true);
254
-
255
-            //migrationBuilder.AlterColumn<int>(
256
-            //    name: "Id",
257
-            //    table: "Accounts",
258
-            //    nullable: false,
259
-            //    oldClrType: typeof(int))
260
-            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
261
-
262
-            //migrationBuilder.CreateIndex(
263
-            //    name: "IX_Users_Username",
264
-            //    table: "Users",
265
-            //    column: "Username",
266
-            //    unique: true);
267
-
268
-            migrationBuilder.CreateIndex(
269
-                name: "IX_UnitConfigurations_Code",
270
-                table: "UnitConfigurations",
271
-                column: "Code",
272
-                unique: true);
273
-
274
-            //migrationBuilder.CreateIndex(
275
-            //    name: "IX_Individuals_Telephone_CellNumber_Email",
276
-            //    table: "Individuals",
277
-            //    columns: new[] { "Telephone", "CellNumber", "Email" },
278
-            //    unique: true);
279
-
280
-            migrationBuilder.AddForeignKey(
281
-                name: "FK_UnitConfigurationTypes_UnitConfigurations_UnitConfiguration~",
282
-                table: "UnitConfigurationTypes",
283
-                column: "UnitConfigurationId",
284
-                principalTable: "UnitConfigurations",
285
-                principalColumn: "Id",
286
-                onDelete: ReferentialAction.Cascade);
287
-        }
288
-
289
-        protected override void Down(MigrationBuilder migrationBuilder)
290
-        {
291
-            migrationBuilder.DropForeignKey(
292
-                name: "FK_UnitConfigurationTypes_UnitConfigurations_UnitConfiguration~",
293
-                table: "UnitConfigurationTypes");
294
-
295
-            migrationBuilder.DropIndex(
296
-                name: "IX_Users_Username",
297
-                table: "Users");
298
-
299
-            migrationBuilder.DropIndex(
300
-                name: "IX_UnitConfigurations_Code",
301
-                table: "UnitConfigurations");
302
-
303
-            migrationBuilder.DropIndex(
304
-                name: "IX_Individuals_Telephone_CellNumber_Email",
305
-                table: "Individuals");
306
-
307
-            migrationBuilder.DropColumn(
308
-                name: "DateAvailable",
309
-                table: "Properties");
310
-
311
-            migrationBuilder.DropColumn(
312
-                name: "Province",
313
-                table: "Addresses");
314
-
315
-            migrationBuilder.AlterColumn<int>(
316
-                name: "Id",
317
-                table: "Weeks",
318
-                nullable: false,
319
-                oldClrType: typeof(int))
320
-                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
321
-
322
-            migrationBuilder.AlterColumn<int>(
323
-                name: "Id",
324
-                table: "Users",
325
-                nullable: false,
326
-                oldClrType: typeof(int))
327
-                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
328
-
329
-            migrationBuilder.AlterColumn<int>(
330
-                name: "Id",
331
-                table: "UserDefinedGroups",
332
-                nullable: false,
333
-                oldClrType: typeof(int))
334
-                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
335
-
336
-            migrationBuilder.AlterColumn<int>(
337
-                name: "Id",
338
-                table: "UserDefinedFields",
339
-                nullable: false,
340
-                oldClrType: typeof(int))
341
-                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
342
-
343
-            migrationBuilder.AlterColumn<int>(
344
-                name: "Id",
345
-                table: "UnitConfigurationTypes",
346
-                nullable: false,
347
-                oldClrType: typeof(int))
348
-                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
349
-
350
-            migrationBuilder.AlterColumn<int>(
351
-                name: "Id",
352
-                table: "UnitConfigurations",
353
-                nullable: false,
354
-                oldClrType: typeof(int))
355
-                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
356
-
357
-            migrationBuilder.AlterColumn<int>(
358
-                name: "Id",
359
-                table: "Templates",
360
-                nullable: false,
361
-                oldClrType: typeof(int))
362
-                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
363
-
364
-            migrationBuilder.AlterColumn<int>(
365
-                name: "Id",
366
-                table: "Suburbs",
367
-                nullable: false,
368
-                oldClrType: typeof(int))
369
-                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
370
-
371
-            migrationBuilder.AlterColumn<int>(
372
-                name: "Id",
373
-                table: "Status",
374
-                nullable: false,
375
-                oldClrType: typeof(int))
376
-                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
377
-
378
-            migrationBuilder.AlterColumn<int>(
379
-                name: "Id",
380
-                table: "Seasons",
381
-                nullable: false,
382
-                oldClrType: typeof(int))
383
-                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
384
-
385
-            migrationBuilder.AlterColumn<int>(
386
-                name: "Id",
387
-                table: "SearchLogs",
388
-                nullable: false,
389
-                oldClrType: typeof(int))
390
-                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
391
-
392
-            migrationBuilder.AlterColumn<int>(
393
-                name: "Id",
394
-                table: "Provinces",
395
-                nullable: false,
396
-                oldClrType: typeof(int))
397
-                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
398
-
399
-            migrationBuilder.AlterColumn<int>(
400
-                name: "Id",
401
-                table: "PropertyUserFields",
402
-                nullable: false,
403
-                oldClrType: typeof(int))
404
-                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
405
-
406
-            migrationBuilder.AlterColumn<int>(
407
-                name: "Id",
408
-                table: "PropertyTypes",
409
-                nullable: false,
410
-                oldClrType: typeof(int))
411
-                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
412
-
413
-            migrationBuilder.AlterColumn<int>(
414
-                name: "Id",
415
-                table: "PropertyImages",
416
-                nullable: false,
417
-                oldClrType: typeof(int))
418
-                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
419
-
420
-            migrationBuilder.AlterColumn<int>(
421
-                name: "Id",
422
-                table: "Properties",
423
-                nullable: false,
424
-                oldClrType: typeof(int))
425
-                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
426
-
427
-            migrationBuilder.AlterColumn<int>(
428
-                name: "Id",
429
-                table: "ProcessFlows",
430
-                nullable: false,
431
-                oldClrType: typeof(int))
432
-                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
433
-
434
-            migrationBuilder.AlterColumn<int>(
435
-                name: "Id",
436
-                table: "PlaceHolders",
437
-                nullable: false,
438
-                oldClrType: typeof(int))
439
-                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
440
-
441
-            migrationBuilder.AlterColumn<int>(
442
-                name: "Id",
443
-                table: "Person",
444
-                nullable: false,
445
-                oldClrType: typeof(int))
446
-                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
447
-
448
-            migrationBuilder.AlterColumn<int>(
449
-                name: "Id",
450
-                table: "Location",
451
-                nullable: false,
452
-                oldClrType: typeof(int))
453
-                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
454
-
455
-            migrationBuilder.AlterColumn<int>(
456
-                name: "Id",
457
-                table: "Individuals",
458
-                nullable: false,
459
-                oldClrType: typeof(int))
460
-                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
461
-
462
-            migrationBuilder.AlterColumn<int>(
463
-                name: "Id",
464
-                table: "Hosts",
465
-                nullable: false,
466
-                oldClrType: typeof(int))
467
-                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
468
-
469
-            migrationBuilder.AlterColumn<int>(
470
-                name: "Id",
471
-                table: "Emails",
472
-                nullable: false,
473
-                oldClrType: typeof(int))
474
-                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
475
-
476
-            migrationBuilder.AlterColumn<int>(
477
-                name: "Id",
478
-                table: "Cities",
479
-                nullable: false,
480
-                oldClrType: typeof(int))
481
-                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
482
-
483
-            migrationBuilder.AlterColumn<int>(
484
-                name: "Id",
485
-                table: "Carousel",
486
-                nullable: false,
487
-                oldClrType: typeof(int))
488
-                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
489
-
490
-            migrationBuilder.AlterColumn<int>(
491
-                name: "Id",
492
-                table: "BidItems",
493
-                nullable: false,
494
-                oldClrType: typeof(int))
495
-                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
496
-
497
-            migrationBuilder.AlterColumn<int>(
498
-                name: "Id",
499
-                table: "Banks",
500
-                nullable: false,
501
-                oldClrType: typeof(int))
502
-                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
503
-
504
-            migrationBuilder.AlterColumn<int>(
505
-                name: "Id",
506
-                table: "BankAccounts",
507
-                nullable: false,
508
-                oldClrType: typeof(int))
509
-                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
510
-
511
-            migrationBuilder.AlterColumn<int>(
512
-                name: "Id",
513
-                table: "Agents",
514
-                nullable: false,
515
-                oldClrType: typeof(int))
516
-                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
517
-
518
-            migrationBuilder.AlterColumn<int>(
519
-                name: "Id",
520
-                table: "Agencies",
521
-                nullable: false,
522
-                oldClrType: typeof(int))
523
-                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
524
-
525
-            migrationBuilder.AlterColumn<int>(
526
-                name: "Id",
527
-                table: "Addresses",
528
-                nullable: false,
529
-                oldClrType: typeof(int))
530
-                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
531
-
532
-            migrationBuilder.AlterColumn<int>(
533
-                name: "Id",
534
-                table: "Accounts",
535
-                nullable: false,
536
-                oldClrType: typeof(int))
537
-                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
538
-
539
-            migrationBuilder.CreateIndex(
540
-                name: "IX_Users_Username",
541
-                table: "Users",
542
-                column: "Username",
543
-                unique: true,
544
-                filter: "[Username] IS NOT NULL");
545
-
546
-            migrationBuilder.CreateIndex(
547
-                name: "IX_UnitConfigurations_Code",
548
-                table: "UnitConfigurations",
549
-                column: "Code",
550
-                unique: true,
551
-                filter: "[Code] IS NOT NULL");
552
-
553
-            migrationBuilder.CreateIndex(
554
-                name: "IX_Individuals_Telephone_CellNumber_Email",
555
-                table: "Individuals",
556
-                columns: new[] { "Telephone", "CellNumber", "Email" },
557
-                unique: true,
558
-                filter: "[Telephone] IS NOT NULL AND [CellNumber] IS NOT NULL AND [Email] IS NOT NULL");
559
-
560
-            migrationBuilder.AddForeignKey(
561
-                name: "FK_UnitConfigurationTypes_UnitConfigurations_UnitConfigurationId",
562
-                table: "UnitConfigurationTypes",
563
-                column: "UnitConfigurationId",
564
-                principalTable: "UnitConfigurations",
565
-                principalColumn: "Id",
566
-                onDelete: ReferentialAction.Cascade);
567
-        }
568
-    }
569
-}

+ 0
- 1339
UnivateProperties_API/Migrations/20200121103350_PaymentsTable.Designer.cs
Diff onderdrukt omdat het te groot bestand
Bestand weergeven


+ 0
- 60
UnivateProperties_API/Migrations/20200121103350_PaymentsTable.cs Bestand weergeven

@@ -1,60 +0,0 @@
1
-using System;
2
-using Microsoft.EntityFrameworkCore.Migrations;
3
-using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
4
-
5
-namespace UnivateProperties_API.Migrations
6
-{
7
-    public partial class PaymentsTable : Migration
8
-    {
9
-        protected override void Up(MigrationBuilder migrationBuilder)
10
-        {
11
-            migrationBuilder.CreateTable(
12
-                name: "Payments",
13
-                columns: table => new
14
-                {
15
-                    Id = table.Column<int>(nullable: false)
16
-                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
17
-                    Created = table.Column<DateTime>(nullable: false),
18
-                    Modified = table.Column<DateTime>(nullable: false),
19
-                    ModifiedBy = table.Column<string>(nullable: true),
20
-                    IsDeleted = table.Column<bool>(nullable: false),
21
-                    TimeshareWeekId = table.Column<int>(nullable: true),
22
-                    PropertyId = table.Column<int>(nullable: true),
23
-                    Amount = table.Column<decimal>(nullable: false),
24
-                    PaymentStatus = table.Column<string>(nullable: true)
25
-                },
26
-                constraints: table =>
27
-                {
28
-                    table.PrimaryKey("PK_Payments", x => x.Id);
29
-                    table.ForeignKey(
30
-                        name: "FK_Payments_Properties_PropertyId",
31
-                        column: x => x.PropertyId,
32
-                        principalTable: "Properties",
33
-                        principalColumn: "Id",
34
-                        onDelete: ReferentialAction.Restrict);
35
-                    table.ForeignKey(
36
-                        name: "FK_Payments_Weeks_TimeshareWeekId",
37
-                        column: x => x.TimeshareWeekId,
38
-                        principalTable: "Weeks",
39
-                        principalColumn: "Id",
40
-                        onDelete: ReferentialAction.Restrict);
41
-                });
42
-
43
-            migrationBuilder.CreateIndex(
44
-                name: "IX_Payments_PropertyId",
45
-                table: "Payments",
46
-                column: "PropertyId");
47
-
48
-            migrationBuilder.CreateIndex(
49
-                name: "IX_Payments_TimeshareWeekId",
50
-                table: "Payments",
51
-                column: "TimeshareWeekId");
52
-        }
53
-
54
-        protected override void Down(MigrationBuilder migrationBuilder)
55
-        {
56
-            migrationBuilder.DropTable(
57
-                name: "Payments");
58
-        }
59
-    }
60
-}

+ 0
- 1350
UnivateProperties_API/Migrations/20200122063527_ExtraPaymentFields.Designer.cs
Diff onderdrukt omdat het te groot bestand
Bestand weergeven


+ 0
- 53
UnivateProperties_API/Migrations/20200122063527_ExtraPaymentFields.cs Bestand weergeven

@@ -1,53 +0,0 @@
1
-using Microsoft.EntityFrameworkCore.Migrations;
2
-
3
-namespace UnivateProperties_API.Migrations
4
-{
5
-    public partial class ExtraPaymentFields : Migration
6
-    {
7
-        protected override void Up(MigrationBuilder migrationBuilder)
8
-        {
9
-            migrationBuilder.AddColumn<int>(
10
-                name: "CreatedById",
11
-                table: "Payments",
12
-                nullable: false,
13
-                defaultValue: 0);
14
-
15
-            migrationBuilder.AddColumn<string>(
16
-                name: "PaymentToken",
17
-                table: "Payments",
18
-                nullable: true);
19
-
20
-            migrationBuilder.CreateIndex(
21
-                name: "IX_Payments_CreatedById",
22
-                table: "Payments",
23
-                column: "CreatedById");
24
-
25
-            migrationBuilder.AddForeignKey(
26
-                name: "FK_Payments_Users_CreatedById",
27
-                table: "Payments",
28
-                column: "CreatedById",
29
-                principalTable: "Users",
30
-                principalColumn: "Id",
31
-                onDelete: ReferentialAction.Cascade);
32
-        }
33
-
34
-        protected override void Down(MigrationBuilder migrationBuilder)
35
-        {
36
-            migrationBuilder.DropForeignKey(
37
-                name: "FK_Payments_Users_CreatedById",
38
-                table: "Payments");
39
-
40
-            migrationBuilder.DropIndex(
41
-                name: "IX_Payments_CreatedById",
42
-                table: "Payments");
43
-
44
-            migrationBuilder.DropColumn(
45
-                name: "CreatedById",
46
-                table: "Payments");
47
-
48
-            migrationBuilder.DropColumn(
49
-                name: "PaymentToken",
50
-                table: "Payments");
51
-        }
52
-    }
53
-}

+ 0
- 1352
UnivateProperties_API/Migrations/20200122131033_DatePublishedToPorp.Designer.cs
Diff onderdrukt omdat het te groot bestand
Bestand weergeven


+ 0
- 24
UnivateProperties_API/Migrations/20200122131033_DatePublishedToPorp.cs Bestand weergeven

@@ -1,24 +0,0 @@
1
-using System;
2
-using Microsoft.EntityFrameworkCore.Migrations;
3
-
4
-namespace UnivateProperties_API.Migrations
5
-{
6
-    public partial class DatePublishedToPorp : Migration
7
-    {
8
-        protected override void Up(MigrationBuilder migrationBuilder)
9
-        {
10
-            migrationBuilder.AddColumn<DateTime>(
11
-                name: "DatePublished",
12
-                table: "Properties",
13
-                nullable: false,
14
-                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
15
-        }
16
-
17
-        protected override void Down(MigrationBuilder migrationBuilder)
18
-        {
19
-            migrationBuilder.DropColumn(
20
-                name: "DatePublished",
21
-                table: "Properties");
22
-        }
23
-    }
24
-}

+ 0
- 200
UnivateProperties_API/Migrations/20200624064952_publish-2020-06-24.cs Bestand weergeven

@@ -1,200 +0,0 @@
1
-using System;
2
-using Microsoft.EntityFrameworkCore.Migrations;
3
-using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
4
-
5
-namespace UnivateProperties_API.Migrations
6
-{
7
-    public partial class publish20200624 : Migration
8
-    {
9
-        protected override void Up(MigrationBuilder migrationBuilder)
10
-        {
11
-            migrationBuilder.AddColumn<DateTime>(
12
-                name: "StatusDate",
13
-                table: "Properties",
14
-                nullable: false,
15
-                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
16
-
17
-            migrationBuilder.CreateTable(
18
-                name: "Campaigns",
19
-                columns: table => new
20
-                {
21
-                    Id = table.Column<int>(nullable: false)
22
-                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
23
-                    Created = table.Column<DateTime>(nullable: false),
24
-                    Modified = table.Column<DateTime>(nullable: false),
25
-                    ModifiedBy = table.Column<string>(nullable: true),
26
-                    IsDeleted = table.Column<bool>(nullable: false),
27
-                    StartDate = table.Column<DateTime>(nullable: false),
28
-                    EndDate = table.Column<DateTime>(nullable: false),
29
-                    Name = table.Column<string>(nullable: true),
30
-                    Subject = table.Column<string>(nullable: true),
31
-                    Body = table.Column<string>(nullable: true),
32
-                    ItemBody = table.Column<string>(nullable: true),
33
-                    ItemsPerRow = table.Column<int>(nullable: false)
34
-                },
35
-                constraints: table =>
36
-                {
37
-                    table.PrimaryKey("PK_Campaigns", x => x.Id);
38
-                });
39
-
40
-            migrationBuilder.CreateTable(
41
-                name: "Defaults",
42
-                columns: table => new
43
-                {
44
-                    Id = table.Column<string>(nullable: false),
45
-                    Value = table.Column<string>(nullable: true)
46
-                },
47
-                constraints: table =>
48
-                {
49
-                    table.PrimaryKey("PK_Defaults", x => x.Id);
50
-                });
51
-
52
-            migrationBuilder.CreateTable(
53
-                name: "PlaceHolderFormats",
54
-                columns: table => new
55
-                {
56
-                    Id = table.Column<int>(nullable: false)
57
-                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
58
-                    Created = table.Column<DateTime>(nullable: false),
59
-                    Modified = table.Column<DateTime>(nullable: false),
60
-                    ModifiedBy = table.Column<string>(nullable: true),
61
-                    IsDeleted = table.Column<bool>(nullable: false),
62
-                    DisplayName = table.Column<string>(nullable: true),
63
-                    Format = table.Column<string>(nullable: true)
64
-                },
65
-                constraints: table =>
66
-                {
67
-                    table.PrimaryKey("PK_PlaceHolderFormats", x => x.Id);
68
-                });
69
-
70
-            migrationBuilder.CreateTable(
71
-                name: "CampaignItems",
72
-                columns: table => new
73
-                {
74
-                    Id = table.Column<int>(nullable: false)
75
-                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
76
-                    Created = table.Column<DateTime>(nullable: false),
77
-                    Modified = table.Column<DateTime>(nullable: false),
78
-                    ModifiedBy = table.Column<string>(nullable: true),
79
-                    IsDeleted = table.Column<bool>(nullable: false),
80
-                    CampaignId = table.Column<int>(nullable: false),
81
-                    WeekId = table.Column<int>(nullable: false),
82
-                    Image = table.Column<string>(nullable: true)
83
-                },
84
-                constraints: table =>
85
-                {
86
-                    table.PrimaryKey("PK_CampaignItems", x => x.Id);
87
-                    table.ForeignKey(
88
-                        name: "FK_CampaignItems_Campaigns_CampaignId",
89
-                        column: x => x.CampaignId,
90
-                        principalTable: "Campaigns",
91
-                        principalColumn: "Id",
92
-                        onDelete: ReferentialAction.Cascade);
93
-                    table.ForeignKey(
94
-                        name: "FK_CampaignItems_Weeks_WeekId",
95
-                        column: x => x.WeekId,
96
-                        principalTable: "Weeks",
97
-                        principalColumn: "Id",
98
-                        onDelete: ReferentialAction.Cascade);
99
-                });
100
-
101
-            migrationBuilder.CreateTable(
102
-                name: "CampaignPlaceHolders",
103
-                columns: table => new
104
-                {
105
-                    Id = table.Column<int>(nullable: false)
106
-                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
107
-                    Created = table.Column<DateTime>(nullable: false),
108
-                    Modified = table.Column<DateTime>(nullable: false),
109
-                    ModifiedBy = table.Column<string>(nullable: true),
110
-                    IsDeleted = table.Column<bool>(nullable: false),
111
-                    Name = table.Column<string>(nullable: true),
112
-                    BoundToClass = table.Column<string>(nullable: true),
113
-                    BoundToClassDisplay = table.Column<string>(nullable: true),
114
-                    BoundTo = table.Column<string>(nullable: true),
115
-                    Format = table.Column<string>(nullable: true),
116
-                    CampaignId = table.Column<int>(nullable: false)
117
-                },
118
-                constraints: table =>
119
-                {
120
-                    table.PrimaryKey("PK_CampaignPlaceHolders", x => x.Id);
121
-                    table.ForeignKey(
122
-                        name: "FK_CampaignPlaceHolders_Campaigns_CampaignId",
123
-                        column: x => x.CampaignId,
124
-                        principalTable: "Campaigns",
125
-                        principalColumn: "Id",
126
-                        onDelete: ReferentialAction.Cascade);
127
-                });
128
-
129
-            migrationBuilder.CreateTable(
130
-                name: "CampaignItemPlaceHolders",
131
-                columns: table => new
132
-                {
133
-                    Id = table.Column<int>(nullable: false)
134
-                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
135
-                    Created = table.Column<DateTime>(nullable: false),
136
-                    Modified = table.Column<DateTime>(nullable: false),
137
-                    ModifiedBy = table.Column<string>(nullable: true),
138
-                    IsDeleted = table.Column<bool>(nullable: false),
139
-                    CampaignItemId = table.Column<int>(nullable: false),
140
-                    PlaceHolder = table.Column<string>(nullable: true),
141
-                    Value = table.Column<string>(nullable: true)
142
-                },
143
-                constraints: table =>
144
-                {
145
-                    table.PrimaryKey("PK_CampaignItemPlaceHolders", x => x.Id);
146
-                    table.ForeignKey(
147
-                        name: "FK_CampaignItemPlaceHolders_CampaignItems_CampaignItemId",
148
-                        column: x => x.CampaignItemId,
149
-                        principalTable: "CampaignItems",
150
-                        principalColumn: "Id",
151
-                        onDelete: ReferentialAction.Cascade);
152
-                });
153
-
154
-            migrationBuilder.CreateIndex(
155
-                name: "IX_CampaignItemPlaceHolders_CampaignItemId",
156
-                table: "CampaignItemPlaceHolders",
157
-                column: "CampaignItemId");
158
-
159
-            migrationBuilder.CreateIndex(
160
-                name: "IX_CampaignItems_CampaignId",
161
-                table: "CampaignItems",
162
-                column: "CampaignId");
163
-
164
-            migrationBuilder.CreateIndex(
165
-                name: "IX_CampaignItems_WeekId",
166
-                table: "CampaignItems",
167
-                column: "WeekId");
168
-
169
-            migrationBuilder.CreateIndex(
170
-                name: "IX_CampaignPlaceHolders_CampaignId",
171
-                table: "CampaignPlaceHolders",
172
-                column: "CampaignId");
173
-        }
174
-
175
-        protected override void Down(MigrationBuilder migrationBuilder)
176
-        {
177
-            migrationBuilder.DropTable(
178
-                name: "CampaignItemPlaceHolders");
179
-
180
-            migrationBuilder.DropTable(
181
-                name: "CampaignPlaceHolders");
182
-
183
-            migrationBuilder.DropTable(
184
-                name: "Defaults");
185
-
186
-            migrationBuilder.DropTable(
187
-                name: "PlaceHolderFormats");
188
-
189
-            migrationBuilder.DropTable(
190
-                name: "CampaignItems");
191
-
192
-            migrationBuilder.DropTable(
193
-                name: "Campaigns");
194
-
195
-            migrationBuilder.DropColumn(
196
-                name: "StatusDate",
197
-                table: "Properties");
198
-        }
199
-    }
200
-}

UnivateProperties_API/Migrations/20200624064952_publish-2020-06-24.Designer.cs → UnivateProperties_API/Migrations/20200625115738_SQL_DB_Create.Designer.cs Bestand weergeven

@@ -2,29 +2,30 @@
2 2
 using System;
3 3
 using Microsoft.EntityFrameworkCore;
4 4
 using Microsoft.EntityFrameworkCore.Infrastructure;
5
+using Microsoft.EntityFrameworkCore.Metadata;
5 6
 using Microsoft.EntityFrameworkCore.Migrations;
6 7
 using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
7
-using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
8 8
 using UnivateProperties_API.Context;
9 9
 
10 10
 namespace UnivateProperties_API.Migrations
11 11
 {
12 12
     [DbContext(typeof(DataContext))]
13
-    [Migration("20200624064952_publish-2020-06-24")]
14
-    partial class publish20200624
13
+    [Migration("20200625115738_SQL_DB_Create")]
14
+    partial class SQL_DB_Create
15 15
     {
16 16
         protected override void BuildTargetModel(ModelBuilder modelBuilder)
17 17
         {
18 18
 #pragma warning disable 612, 618
19 19
             modelBuilder
20
-                .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn)
21
-                .HasAnnotation("ProductVersion", "2.2.4-servicing-10062")
22
-                .HasAnnotation("Relational:MaxIdentifierLength", 63);
20
+                .HasAnnotation("ProductVersion", "2.2.0-rtm-35687")
21
+                .HasAnnotation("Relational:MaxIdentifierLength", 128)
22
+                .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
23 23
 
24 24
             modelBuilder.Entity("UnivateProperties_API.Model.Banks.Bank", b =>
25 25
                 {
26 26
                     b.Property<int>("Id")
27
-                        .ValueGeneratedOnAdd();
27
+                        .ValueGeneratedOnAdd()
28
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
28 29
 
29 30
                     b.Property<DateTime>("Created");
30 31
 
@@ -46,7 +47,8 @@ namespace UnivateProperties_API.Migrations
46 47
             modelBuilder.Entity("UnivateProperties_API.Model.Banks.BankAccount", b =>
47 48
                 {
48 49
                     b.Property<int>("Id")
49
-                        .ValueGeneratedOnAdd();
50
+                        .ValueGeneratedOnAdd()
51
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
50 52
 
51 53
                     b.Property<string>("AccountHolder");
52 54
 
@@ -76,7 +78,8 @@ namespace UnivateProperties_API.Migrations
76 78
             modelBuilder.Entity("UnivateProperties_API.Model.Campaigns.Campaign", b =>
77 79
                 {
78 80
                     b.Property<int>("Id")
79
-                        .ValueGeneratedOnAdd();
81
+                        .ValueGeneratedOnAdd()
82
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
80 83
 
81 84
                     b.Property<string>("Body");
82 85
 
@@ -108,7 +111,8 @@ namespace UnivateProperties_API.Migrations
108 111
             modelBuilder.Entity("UnivateProperties_API.Model.Campaigns.CampaignItem", b =>
109 112
                 {
110 113
                     b.Property<int>("Id")
111
-                        .ValueGeneratedOnAdd();
114
+                        .ValueGeneratedOnAdd()
115
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
112 116
 
113 117
                     b.Property<int>("CampaignId");
114 118
 
@@ -136,7 +140,8 @@ namespace UnivateProperties_API.Migrations
136 140
             modelBuilder.Entity("UnivateProperties_API.Model.Campaigns.CampaignItemPlaceHolder", b =>
137 141
                 {
138 142
                     b.Property<int>("Id")
139
-                        .ValueGeneratedOnAdd();
143
+                        .ValueGeneratedOnAdd()
144
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
140 145
 
141 146
                     b.Property<int>("CampaignItemId");
142 147
 
@@ -162,7 +167,8 @@ namespace UnivateProperties_API.Migrations
162 167
             modelBuilder.Entity("UnivateProperties_API.Model.Campaigns.CampaignPlaceHolder", b =>
163 168
                 {
164 169
                     b.Property<int>("Id")
165
-                        .ValueGeneratedOnAdd();
170
+                        .ValueGeneratedOnAdd()
171
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
166 172
 
167 173
                     b.Property<string>("BoundTo");
168 174
 
@@ -194,7 +200,8 @@ namespace UnivateProperties_API.Migrations
194 200
             modelBuilder.Entity("UnivateProperties_API.Model.Communication.Email", b =>
195 201
                 {
196 202
                     b.Property<int>("Id")
197
-                        .ValueGeneratedOnAdd();
203
+                        .ValueGeneratedOnAdd()
204
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
198 205
 
199 206
                     b.Property<string>("BCC");
200 207
 
@@ -232,7 +239,8 @@ namespace UnivateProperties_API.Migrations
232 239
             modelBuilder.Entity("UnivateProperties_API.Model.Communication.PlaceHolder", b =>
233 240
                 {
234 241
                     b.Property<int>("Id")
235
-                        .ValueGeneratedOnAdd();
242
+                        .ValueGeneratedOnAdd()
243
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
236 244
 
237 245
                     b.Property<string>("BoundTo");
238 246
 
@@ -262,7 +270,8 @@ namespace UnivateProperties_API.Migrations
262 270
             modelBuilder.Entity("UnivateProperties_API.Model.Communication.SMTPAccount", b =>
263 271
                 {
264 272
                     b.Property<int>("Id")
265
-                        .ValueGeneratedOnAdd();
273
+                        .ValueGeneratedOnAdd()
274
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
266 275
 
267 276
                     b.Property<string>("Address");
268 277
 
@@ -290,7 +299,8 @@ namespace UnivateProperties_API.Migrations
290 299
             modelBuilder.Entity("UnivateProperties_API.Model.Communication.SMTPHost", b =>
291 300
                 {
292 301
                     b.Property<int>("Id")
293
-                        .ValueGeneratedOnAdd();
302
+                        .ValueGeneratedOnAdd()
303
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
294 304
 
295 305
                     b.Property<DateTime>("Created");
296 306
 
@@ -318,7 +328,8 @@ namespace UnivateProperties_API.Migrations
318 328
             modelBuilder.Entity("UnivateProperties_API.Model.Communication.Template", b =>
319 329
                 {
320 330
                     b.Property<int>("Id")
321
-                        .ValueGeneratedOnAdd();
331
+                        .ValueGeneratedOnAdd()
332
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
322 333
 
323 334
                     b.Property<string>("Body");
324 335
 
@@ -346,7 +357,8 @@ namespace UnivateProperties_API.Migrations
346 357
             modelBuilder.Entity("UnivateProperties_API.Model.Financial.Payment", b =>
347 358
                 {
348 359
                     b.Property<int>("Id")
349
-                        .ValueGeneratedOnAdd();
360
+                        .ValueGeneratedOnAdd()
361
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
350 362
 
351 363
                     b.Property<decimal>("Amount");
352 364
 
@@ -382,7 +394,8 @@ namespace UnivateProperties_API.Migrations
382 394
             modelBuilder.Entity("UnivateProperties_API.Model.Logging.SearchLog", b =>
383 395
                 {
384 396
                     b.Property<int>("Id")
385
-                        .ValueGeneratedOnAdd();
397
+                        .ValueGeneratedOnAdd()
398
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
386 399
 
387 400
                     b.Property<DateTime>("Created");
388 401
 
@@ -404,7 +417,8 @@ namespace UnivateProperties_API.Migrations
404 417
             modelBuilder.Entity("UnivateProperties_API.Model.Misc.Address", b =>
405 418
                 {
406 419
                     b.Property<int>("Id")
407
-                        .ValueGeneratedOnAdd();
420
+                        .ValueGeneratedOnAdd()
421
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
408 422
 
409 423
                     b.Property<string>("City");
410 424
 
@@ -438,7 +452,8 @@ namespace UnivateProperties_API.Migrations
438 452
             modelBuilder.Entity("UnivateProperties_API.Model.Misc.Carousel", b =>
439 453
                 {
440 454
                     b.Property<int>("Id")
441
-                        .ValueGeneratedOnAdd();
455
+                        .ValueGeneratedOnAdd()
456
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
442 457
 
443 458
                     b.Property<DateTime>("Created");
444 459
 
@@ -476,7 +491,8 @@ namespace UnivateProperties_API.Migrations
476 491
             modelBuilder.Entity("UnivateProperties_API.Model.Misc.Location", b =>
477 492
                 {
478 493
                     b.Property<int>("Id")
479
-                        .ValueGeneratedOnAdd();
494
+                        .ValueGeneratedOnAdd()
495
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
480 496
 
481 497
                     b.Property<DateTime>("Created");
482 498
 
@@ -498,7 +514,8 @@ namespace UnivateProperties_API.Migrations
498 514
             modelBuilder.Entity("UnivateProperties_API.Model.Misc.PlaceHolderFormat", b =>
499 515
                 {
500 516
                     b.Property<int>("Id")
501
-                        .ValueGeneratedOnAdd();
517
+                        .ValueGeneratedOnAdd()
518
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
502 519
 
503 520
                     b.Property<DateTime>("Created");
504 521
 
@@ -520,7 +537,8 @@ namespace UnivateProperties_API.Migrations
520 537
             modelBuilder.Entity("UnivateProperties_API.Model.ProcessFlow.BidItem", b =>
521 538
                 {
522 539
                     b.Property<int>("Id")
523
-                        .ValueGeneratedOnAdd();
540
+                        .ValueGeneratedOnAdd()
541
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
524 542
 
525 543
                     b.Property<double>("Amount");
526 544
 
@@ -560,7 +578,8 @@ namespace UnivateProperties_API.Migrations
560 578
             modelBuilder.Entity("UnivateProperties_API.Model.ProcessFlow.ProcessFlow", b =>
561 579
                 {
562 580
                     b.Property<int>("Id")
563
-                        .ValueGeneratedOnAdd();
581
+                        .ValueGeneratedOnAdd()
582
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
564 583
 
565 584
                     b.Property<DateTime>("Created");
566 585
 
@@ -590,7 +609,8 @@ namespace UnivateProperties_API.Migrations
590 609
             modelBuilder.Entity("UnivateProperties_API.Model.Properties.Property", b =>
591 610
                 {
592 611
                     b.Property<int>("Id")
593
-                        .ValueGeneratedOnAdd();
612
+                        .ValueGeneratedOnAdd()
613
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
594 614
 
595 615
                     b.Property<string>("AddressLine1");
596 616
 
@@ -656,25 +676,16 @@ namespace UnivateProperties_API.Migrations
656 676
 
657 677
                     b.HasIndex("AgentId");
658 678
 
659
-                    b.HasIndex("CityId");
660
-
661 679
                     b.HasIndex("OwnerId");
662 680
 
663
-                    b.HasIndex("PropertyTypeId");
664
-
665
-                    b.HasIndex("ProvinceId");
666
-
667
-                    b.HasIndex("StatusId");
668
-
669
-                    b.HasIndex("SuburbId");
670
-
671 681
                     b.ToTable("Properties");
672 682
                 });
673 683
 
674 684
             modelBuilder.Entity("UnivateProperties_API.Model.Properties.PropertyImage", b =>
675 685
                 {
676 686
                     b.Property<int>("Id")
677
-                        .ValueGeneratedOnAdd();
687
+                        .ValueGeneratedOnAdd()
688
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
678 689
 
679 690
                     b.Property<DateTime>("Created");
680 691
 
@@ -700,7 +711,8 @@ namespace UnivateProperties_API.Migrations
700 711
             modelBuilder.Entity("UnivateProperties_API.Model.Properties.PropertyType", b =>
701 712
                 {
702 713
                     b.Property<int>("Id")
703
-                        .ValueGeneratedOnAdd();
714
+                        .ValueGeneratedOnAdd()
715
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
704 716
 
705 717
                     b.Property<DateTime>("Created");
706 718
 
@@ -722,7 +734,8 @@ namespace UnivateProperties_API.Migrations
722 734
             modelBuilder.Entity("UnivateProperties_API.Model.Properties.PropertyUserField", b =>
723 735
                 {
724 736
                     b.Property<int>("Id")
725
-                        .ValueGeneratedOnAdd();
737
+                        .ValueGeneratedOnAdd()
738
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
726 739
 
727 740
                     b.Property<DateTime>("Created");
728 741
 
@@ -752,7 +765,8 @@ namespace UnivateProperties_API.Migrations
752 765
             modelBuilder.Entity("UnivateProperties_API.Model.Properties.UserDefinedField", b =>
753 766
                 {
754 767
                     b.Property<int>("Id")
755
-                        .ValueGeneratedOnAdd();
768
+                        .ValueGeneratedOnAdd()
769
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
756 770
 
757 771
                     b.Property<DateTime>("Created");
758 772
 
@@ -780,7 +794,8 @@ namespace UnivateProperties_API.Migrations
780 794
             modelBuilder.Entity("UnivateProperties_API.Model.Properties.UserDefinedGroup", b =>
781 795
                 {
782 796
                     b.Property<int>("Id")
783
-                        .ValueGeneratedOnAdd();
797
+                        .ValueGeneratedOnAdd()
798
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
784 799
 
785 800
                     b.Property<DateTime>("Created");
786 801
 
@@ -804,7 +819,8 @@ namespace UnivateProperties_API.Migrations
804 819
             modelBuilder.Entity("UnivateProperties_API.Model.Region.City", b =>
805 820
                 {
806 821
                     b.Property<int>("Id")
807
-                        .ValueGeneratedOnAdd();
822
+                        .ValueGeneratedOnAdd()
823
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
808 824
 
809 825
                     b.Property<string>("Code");
810 826
 
@@ -830,7 +846,8 @@ namespace UnivateProperties_API.Migrations
830 846
             modelBuilder.Entity("UnivateProperties_API.Model.Region.Province", b =>
831 847
                 {
832 848
                     b.Property<int>("Id")
833
-                        .ValueGeneratedOnAdd();
849
+                        .ValueGeneratedOnAdd()
850
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
834 851
 
835 852
                     b.Property<string>("Code");
836 853
 
@@ -852,7 +869,8 @@ namespace UnivateProperties_API.Migrations
852 869
             modelBuilder.Entity("UnivateProperties_API.Model.Region.Suburb", b =>
853 870
                 {
854 871
                     b.Property<int>("Id")
855
-                        .ValueGeneratedOnAdd();
872
+                        .ValueGeneratedOnAdd()
873
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
856 874
 
857 875
                     b.Property<int>("CityId");
858 876
 
@@ -878,7 +896,8 @@ namespace UnivateProperties_API.Migrations
878 896
             modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.Season", b =>
879 897
                 {
880 898
                     b.Property<int>("Id")
881
-                        .ValueGeneratedOnAdd();
899
+                        .ValueGeneratedOnAdd()
900
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
882 901
 
883 902
                     b.Property<DateTime>("Created");
884 903
 
@@ -898,7 +917,8 @@ namespace UnivateProperties_API.Migrations
898 917
             modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.Status", b =>
899 918
                 {
900 919
                     b.Property<int>("Id")
901
-                        .ValueGeneratedOnAdd();
920
+                        .ValueGeneratedOnAdd()
921
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
902 922
 
903 923
                     b.Property<string>("Code");
904 924
 
@@ -922,7 +942,8 @@ namespace UnivateProperties_API.Migrations
922 942
             modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.TimeshareWeek", b =>
923 943
                 {
924 944
                     b.Property<int>("Id")
925
-                        .ValueGeneratedOnAdd();
945
+                        .ValueGeneratedOnAdd()
946
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
926 947
 
927 948
                     b.Property<int?>("AgencyId");
928 949
 
@@ -1008,7 +1029,8 @@ namespace UnivateProperties_API.Migrations
1008 1029
             modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.UnitConfiguration", b =>
1009 1030
                 {
1010 1031
                     b.Property<int>("Id")
1011
-                        .ValueGeneratedOnAdd();
1032
+                        .ValueGeneratedOnAdd()
1033
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
1012 1034
 
1013 1035
                     b.Property<int>("Adults");
1014 1036
 
@@ -1029,7 +1051,8 @@ namespace UnivateProperties_API.Migrations
1029 1051
                     b.HasKey("Id");
1030 1052
 
1031 1053
                     b.HasIndex("Code")
1032
-                        .IsUnique();
1054
+                        .IsUnique()
1055
+                        .HasFilter("[Code] IS NOT NULL");
1033 1056
 
1034 1057
                     b.ToTable("UnitConfigurations");
1035 1058
                 });
@@ -1037,7 +1060,8 @@ namespace UnivateProperties_API.Migrations
1037 1060
             modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.UnitConfigurationType", b =>
1038 1061
                 {
1039 1062
                     b.Property<int>("Id")
1040
-                        .ValueGeneratedOnAdd();
1063
+                        .ValueGeneratedOnAdd()
1064
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
1041 1065
 
1042 1066
                     b.Property<DateTime>("Created");
1043 1067
 
@@ -1061,7 +1085,8 @@ namespace UnivateProperties_API.Migrations
1061 1085
             modelBuilder.Entity("UnivateProperties_API.Model.Users.Agency", b =>
1062 1086
                 {
1063 1087
                     b.Property<int>("Id")
1064
-                        .ValueGeneratedOnAdd();
1088
+                        .ValueGeneratedOnAdd()
1089
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
1065 1090
 
1066 1091
                     b.Property<string>("AgencyName");
1067 1092
 
@@ -1085,7 +1110,8 @@ namespace UnivateProperties_API.Migrations
1085 1110
             modelBuilder.Entity("UnivateProperties_API.Model.Users.Agent", b =>
1086 1111
                 {
1087 1112
                     b.Property<int>("Id")
1088
-                        .ValueGeneratedOnAdd();
1113
+                        .ValueGeneratedOnAdd()
1114
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
1089 1115
 
1090 1116
                     b.Property<int?>("AgencyId");
1091 1117
 
@@ -1125,7 +1151,8 @@ namespace UnivateProperties_API.Migrations
1125 1151
             modelBuilder.Entity("UnivateProperties_API.Model.Users.Individual", b =>
1126 1152
                 {
1127 1153
                     b.Property<int>("Id")
1128
-                        .ValueGeneratedOnAdd();
1154
+                        .ValueGeneratedOnAdd()
1155
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
1129 1156
 
1130 1157
                     b.Property<int?>("AddressId");
1131 1158
 
@@ -1172,7 +1199,8 @@ namespace UnivateProperties_API.Migrations
1172 1199
                     b.HasIndex("UserId");
1173 1200
 
1174 1201
                     b.HasIndex("Telephone", "CellNumber", "Email")
1175
-                        .IsUnique();
1202
+                        .IsUnique()
1203
+                        .HasFilter("[Telephone] IS NOT NULL AND [CellNumber] IS NOT NULL AND [Email] IS NOT NULL");
1176 1204
 
1177 1205
                     b.ToTable("Individuals");
1178 1206
                 });
@@ -1180,7 +1208,8 @@ namespace UnivateProperties_API.Migrations
1180 1208
             modelBuilder.Entity("UnivateProperties_API.Model.Users.Person", b =>
1181 1209
                 {
1182 1210
                     b.Property<int>("Id")
1183
-                        .ValueGeneratedOnAdd();
1211
+                        .ValueGeneratedOnAdd()
1212
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
1184 1213
 
1185 1214
                     b.Property<string>("CellNumber");
1186 1215
 
@@ -1212,7 +1241,8 @@ namespace UnivateProperties_API.Migrations
1212 1241
             modelBuilder.Entity("UnivateProperties_API.Model.Users.User", b =>
1213 1242
                 {
1214 1243
                     b.Property<int>("Id")
1215
-                        .ValueGeneratedOnAdd();
1244
+                        .ValueGeneratedOnAdd()
1245
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
1216 1246
 
1217 1247
                     b.Property<DateTime>("Created");
1218 1248
 
@@ -1237,7 +1267,8 @@ namespace UnivateProperties_API.Migrations
1237 1267
                     b.HasKey("Id");
1238 1268
 
1239 1269
                     b.HasIndex("Username")
1240
-                        .IsUnique();
1270
+                        .IsUnique()
1271
+                        .HasFilter("[Username] IS NOT NULL");
1241 1272
 
1242 1273
                     b.ToTable("Users");
1243 1274
                 });
@@ -1381,33 +1412,9 @@ namespace UnivateProperties_API.Migrations
1381 1412
                         .WithMany("Properties")
1382 1413
                         .HasForeignKey("AgentId");
1383 1414
 
1384
-                    b.HasOne("UnivateProperties_API.Model.Region.City", "City")
1385
-                        .WithMany()
1386
-                        .HasForeignKey("CityId")
1387
-                        .OnDelete(DeleteBehavior.Cascade);
1388
-
1389 1415
                     b.HasOne("UnivateProperties_API.Model.Users.Individual", "Owner")
1390 1416
                         .WithMany("Properties")
1391 1417
                         .HasForeignKey("OwnerId");
1392
-
1393
-                    b.HasOne("UnivateProperties_API.Model.Properties.PropertyType", "PropertyType")
1394
-                        .WithMany()
1395
-                        .HasForeignKey("PropertyTypeId")
1396
-                        .OnDelete(DeleteBehavior.Cascade);
1397
-
1398
-                    b.HasOne("UnivateProperties_API.Model.Region.Province", "Province")
1399
-                        .WithMany()
1400
-                        .HasForeignKey("ProvinceId")
1401
-                        .OnDelete(DeleteBehavior.Cascade);
1402
-
1403
-                    b.HasOne("UnivateProperties_API.Model.Timeshare.Status", "Status")
1404
-                        .WithMany()
1405
-                        .HasForeignKey("StatusId");
1406
-
1407
-                    b.HasOne("UnivateProperties_API.Model.Region.Suburb", "Suburb")
1408
-                        .WithMany()
1409
-                        .HasForeignKey("SuburbId")
1410
-                        .OnDelete(DeleteBehavior.Cascade);
1411 1418
                 });
1412 1419
 
1413 1420
             modelBuilder.Entity("UnivateProperties_API.Model.Properties.PropertyImage", b =>

+ 1482
- 0
UnivateProperties_API/Migrations/20200625115738_SQL_DB_Create.cs
Diff onderdrukt omdat het te groot bestand
Bestand weergeven


UnivateProperties_API/Migrations/20200107112926_test.Designer.cs → UnivateProperties_API/Migrations/20200625173633_Update-Database.Designer.cs Bestand weergeven

@@ -10,14 +10,14 @@ using UnivateProperties_API.Context;
10 10
 namespace UnivateProperties_API.Migrations
11 11
 {
12 12
     [DbContext(typeof(DataContext))]
13
-    [Migration("20200107112926_test")]
14
-    partial class test
13
+    [Migration("20200625173633_Update-Database")]
14
+    partial class UpdateDatabase
15 15
     {
16 16
         protected override void BuildTargetModel(ModelBuilder modelBuilder)
17 17
         {
18 18
 #pragma warning disable 612, 618
19 19
             modelBuilder
20
-                .HasAnnotation("ProductVersion", "2.2.6-servicing-10079")
20
+                .HasAnnotation("ProductVersion", "2.2.0-rtm-35687")
21 21
                 .HasAnnotation("Relational:MaxIdentifierLength", 128)
22 22
                 .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
23 23
 
@@ -75,6 +75,128 @@ namespace UnivateProperties_API.Migrations
75 75
                     b.ToTable("BankAccounts");
76 76
                 });
77 77
 
78
+            modelBuilder.Entity("UnivateProperties_API.Model.Campaigns.Campaign", b =>
79
+                {
80
+                    b.Property<int>("Id")
81
+                        .ValueGeneratedOnAdd()
82
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
83
+
84
+                    b.Property<string>("Body");
85
+
86
+                    b.Property<DateTime>("Created");
87
+
88
+                    b.Property<DateTime>("EndDate");
89
+
90
+                    b.Property<bool>("IsDeleted");
91
+
92
+                    b.Property<string>("ItemBody");
93
+
94
+                    b.Property<int>("ItemsPerRow");
95
+
96
+                    b.Property<DateTime>("Modified");
97
+
98
+                    b.Property<string>("ModifiedBy");
99
+
100
+                    b.Property<string>("Name");
101
+
102
+                    b.Property<DateTime>("StartDate");
103
+
104
+                    b.Property<string>("Subject");
105
+
106
+                    b.HasKey("Id");
107
+
108
+                    b.ToTable("Campaigns");
109
+                });
110
+
111
+            modelBuilder.Entity("UnivateProperties_API.Model.Campaigns.CampaignItem", b =>
112
+                {
113
+                    b.Property<int>("Id")
114
+                        .ValueGeneratedOnAdd()
115
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
116
+
117
+                    b.Property<int>("CampaignId");
118
+
119
+                    b.Property<DateTime>("Created");
120
+
121
+                    b.Property<string>("Image");
122
+
123
+                    b.Property<bool>("IsDeleted");
124
+
125
+                    b.Property<DateTime>("Modified");
126
+
127
+                    b.Property<string>("ModifiedBy");
128
+
129
+                    b.Property<int>("WeekId");
130
+
131
+                    b.HasKey("Id");
132
+
133
+                    b.HasIndex("CampaignId");
134
+
135
+                    b.HasIndex("WeekId");
136
+
137
+                    b.ToTable("CampaignItems");
138
+                });
139
+
140
+            modelBuilder.Entity("UnivateProperties_API.Model.Campaigns.CampaignItemPlaceHolder", b =>
141
+                {
142
+                    b.Property<int>("Id")
143
+                        .ValueGeneratedOnAdd()
144
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
145
+
146
+                    b.Property<int>("CampaignItemId");
147
+
148
+                    b.Property<DateTime>("Created");
149
+
150
+                    b.Property<bool>("IsDeleted");
151
+
152
+                    b.Property<DateTime>("Modified");
153
+
154
+                    b.Property<string>("ModifiedBy");
155
+
156
+                    b.Property<string>("PlaceHolder");
157
+
158
+                    b.Property<string>("Value");
159
+
160
+                    b.HasKey("Id");
161
+
162
+                    b.HasIndex("CampaignItemId");
163
+
164
+                    b.ToTable("CampaignItemPlaceHolders");
165
+                });
166
+
167
+            modelBuilder.Entity("UnivateProperties_API.Model.Campaigns.CampaignPlaceHolder", b =>
168
+                {
169
+                    b.Property<int>("Id")
170
+                        .ValueGeneratedOnAdd()
171
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
172
+
173
+                    b.Property<string>("BoundTo");
174
+
175
+                    b.Property<string>("BoundToClass");
176
+
177
+                    b.Property<string>("BoundToClassDisplay");
178
+
179
+                    b.Property<int>("CampaignId");
180
+
181
+                    b.Property<DateTime>("Created");
182
+
183
+                    b.Property<string>("Format");
184
+
185
+                    b.Property<bool>("IsDeleted");
186
+
187
+                    b.Property<DateTime>("Modified");
188
+
189
+                    b.Property<string>("ModifiedBy");
190
+
191
+                    b.Property<string>("Name");
192
+
193
+                    b.HasKey("Id");
194
+
195
+                    b.HasIndex("CampaignId");
196
+
197
+                    b.ToTable("CampaignPlaceHolders");
198
+                });
199
+
78 200
             modelBuilder.Entity("UnivateProperties_API.Model.Communication.Email", b =>
79 201
                 {
80 202
                     b.Property<int>("Id")
@@ -232,6 +354,43 @@ namespace UnivateProperties_API.Migrations
232 354
                     b.ToTable("Templates");
233 355
                 });
234 356
 
357
+            modelBuilder.Entity("UnivateProperties_API.Model.Financial.Payment", b =>
358
+                {
359
+                    b.Property<int>("Id")
360
+                        .ValueGeneratedOnAdd()
361
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
362
+
363
+                    b.Property<decimal>("Amount");
364
+
365
+                    b.Property<DateTime>("Created");
366
+
367
+                    b.Property<int>("CreatedById");
368
+
369
+                    b.Property<bool>("IsDeleted");
370
+
371
+                    b.Property<DateTime>("Modified");
372
+
373
+                    b.Property<string>("ModifiedBy");
374
+
375
+                    b.Property<string>("PaymentStatus");
376
+
377
+                    b.Property<string>("PaymentToken");
378
+
379
+                    b.Property<int?>("PropertyId");
380
+
381
+                    b.Property<int?>("TimeshareWeekId");
382
+
383
+                    b.HasKey("Id");
384
+
385
+                    b.HasIndex("CreatedById");
386
+
387
+                    b.HasIndex("PropertyId");
388
+
389
+                    b.HasIndex("TimeshareWeekId");
390
+
391
+                    b.ToTable("Payments");
392
+                });
393
+
235 394
             modelBuilder.Entity("UnivateProperties_API.Model.Logging.SearchLog", b =>
236 395
                 {
237 396
                     b.Property<int>("Id")
@@ -275,6 +434,8 @@ namespace UnivateProperties_API.Migrations
275 434
 
276 435
                     b.Property<string>("PostalCode");
277 436
 
437
+                    b.Property<string>("Province");
438
+
278 439
                     b.Property<string>("Street");
279 440
 
280 441
                     b.Property<string>("StreetNumber");
@@ -315,6 +476,18 @@ namespace UnivateProperties_API.Migrations
315 476
                     b.ToTable("Carousel");
316 477
                 });
317 478
 
479
+            modelBuilder.Entity("UnivateProperties_API.Model.Misc.Default", b =>
480
+                {
481
+                    b.Property<string>("Id")
482
+                        .ValueGeneratedOnAdd();
483
+
484
+                    b.Property<string>("Value");
485
+
486
+                    b.HasKey("Id");
487
+
488
+                    b.ToTable("Defaults");
489
+                });
490
+
318 491
             modelBuilder.Entity("UnivateProperties_API.Model.Misc.Location", b =>
319 492
                 {
320 493
                     b.Property<int>("Id")
@@ -338,6 +511,29 @@ namespace UnivateProperties_API.Migrations
338 511
                     b.ToTable("Location");
339 512
                 });
340 513
 
514
+            modelBuilder.Entity("UnivateProperties_API.Model.Misc.PlaceHolderFormat", b =>
515
+                {
516
+                    b.Property<int>("Id")
517
+                        .ValueGeneratedOnAdd()
518
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
519
+
520
+                    b.Property<DateTime>("Created");
521
+
522
+                    b.Property<string>("DisplayName");
523
+
524
+                    b.Property<string>("Format");
525
+
526
+                    b.Property<bool>("IsDeleted");
527
+
528
+                    b.Property<DateTime>("Modified");
529
+
530
+                    b.Property<string>("ModifiedBy");
531
+
532
+                    b.HasKey("Id");
533
+
534
+                    b.ToTable("PlaceHolderFormats");
535
+                });
536
+
341 537
             modelBuilder.Entity("UnivateProperties_API.Model.ProcessFlow.BidItem", b =>
342 538
                 {
343 539
                     b.Property<int>("Id")
@@ -430,6 +626,10 @@ namespace UnivateProperties_API.Migrations
430 626
 
431 627
                     b.Property<DateTime>("Created");
432 628
 
629
+                    b.Property<DateTime>("DateAvailable");
630
+
631
+                    b.Property<DateTime>("DatePublished");
632
+
433 633
                     b.Property<string>("Description");
434 634
 
435 635
                     b.Property<bool>("IsDeleted");
@@ -458,6 +658,8 @@ namespace UnivateProperties_API.Migrations
458 658
 
459 659
                     b.Property<string>("ShortDescription");
460 660
 
661
+                    b.Property<DateTime>("StatusDate");
662
+
461 663
                     b.Property<int?>("StatusId");
462 664
 
463 665
                     b.Property<int>("SuburbId");
@@ -474,18 +676,8 @@ namespace UnivateProperties_API.Migrations
474 676
 
475 677
                     b.HasIndex("AgentId");
476 678
 
477
-                    b.HasIndex("CityId");
478
-
479 679
                     b.HasIndex("OwnerId");
480 680
 
481
-                    b.HasIndex("PropertyTypeId");
482
-
483
-                    b.HasIndex("ProvinceId");
484
-
485
-                    b.HasIndex("StatusId");
486
-
487
-                    b.HasIndex("SuburbId");
488
-
489 681
                     b.ToTable("Properties");
490 682
                 });
491 683
 
@@ -1092,6 +1284,35 @@ namespace UnivateProperties_API.Migrations
1092 1284
                         .HasForeignKey("OwnerId");
1093 1285
                 });
1094 1286
 
1287
+            modelBuilder.Entity("UnivateProperties_API.Model.Campaigns.CampaignItem", b =>
1288
+                {
1289
+                    b.HasOne("UnivateProperties_API.Model.Campaigns.Campaign", "Campaign")
1290
+                        .WithMany("Items")
1291
+                        .HasForeignKey("CampaignId")
1292
+                        .OnDelete(DeleteBehavior.Cascade);
1293
+
1294
+                    b.HasOne("UnivateProperties_API.Model.Timeshare.TimeshareWeek", "Week")
1295
+                        .WithMany()
1296
+                        .HasForeignKey("WeekId")
1297
+                        .OnDelete(DeleteBehavior.Cascade);
1298
+                });
1299
+
1300
+            modelBuilder.Entity("UnivateProperties_API.Model.Campaigns.CampaignItemPlaceHolder", b =>
1301
+                {
1302
+                    b.HasOne("UnivateProperties_API.Model.Campaigns.CampaignItem", "CampaignItem")
1303
+                        .WithMany("CampaignItemPlaceHolder")
1304
+                        .HasForeignKey("CampaignItemId")
1305
+                        .OnDelete(DeleteBehavior.Cascade);
1306
+                });
1307
+
1308
+            modelBuilder.Entity("UnivateProperties_API.Model.Campaigns.CampaignPlaceHolder", b =>
1309
+                {
1310
+                    b.HasOne("UnivateProperties_API.Model.Campaigns.Campaign", "Campaign")
1311
+                        .WithMany("PlaceHolders")
1312
+                        .HasForeignKey("CampaignId")
1313
+                        .OnDelete(DeleteBehavior.Cascade);
1314
+                });
1315
+
1095 1316
             modelBuilder.Entity("UnivateProperties_API.Model.Communication.Email", b =>
1096 1317
                 {
1097 1318
                     b.HasOne("UnivateProperties_API.Model.Communication.SMTPAccount", "Sender")
@@ -1123,6 +1344,22 @@ namespace UnivateProperties_API.Migrations
1123 1344
                         .HasForeignKey("SenderId");
1124 1345
                 });
1125 1346
 
1347
+            modelBuilder.Entity("UnivateProperties_API.Model.Financial.Payment", b =>
1348
+                {
1349
+                    b.HasOne("UnivateProperties_API.Model.Users.User", "CreatedBy")
1350
+                        .WithMany()
1351
+                        .HasForeignKey("CreatedById")
1352
+                        .OnDelete(DeleteBehavior.Cascade);
1353
+
1354
+                    b.HasOne("UnivateProperties_API.Model.Properties.Property", "Property")
1355
+                        .WithMany()
1356
+                        .HasForeignKey("PropertyId");
1357
+
1358
+                    b.HasOne("UnivateProperties_API.Model.Timeshare.TimeshareWeek", "TimeshareWeek")
1359
+                        .WithMany()
1360
+                        .HasForeignKey("TimeshareWeekId");
1361
+                });
1362
+
1126 1363
             modelBuilder.Entity("UnivateProperties_API.Model.Misc.Address", b =>
1127 1364
                 {
1128 1365
                     b.HasOne("UnivateProperties_API.Model.Users.Individual", "Owner")
@@ -1175,33 +1412,9 @@ namespace UnivateProperties_API.Migrations
1175 1412
                         .WithMany("Properties")
1176 1413
                         .HasForeignKey("AgentId");
1177 1414
 
1178
-                    b.HasOne("UnivateProperties_API.Model.Region.City", "City")
1179
-                        .WithMany()
1180
-                        .HasForeignKey("CityId")
1181
-                        .OnDelete(DeleteBehavior.Cascade);
1182
-
1183 1415
                     b.HasOne("UnivateProperties_API.Model.Users.Individual", "Owner")
1184 1416
                         .WithMany("Properties")
1185 1417
                         .HasForeignKey("OwnerId");
1186
-
1187
-                    b.HasOne("UnivateProperties_API.Model.Properties.PropertyType", "PropertyType")
1188
-                        .WithMany()
1189
-                        .HasForeignKey("PropertyTypeId")
1190
-                        .OnDelete(DeleteBehavior.Cascade);
1191
-
1192
-                    b.HasOne("UnivateProperties_API.Model.Region.Province", "Province")
1193
-                        .WithMany()
1194
-                        .HasForeignKey("ProvinceId")
1195
-                        .OnDelete(DeleteBehavior.Cascade);
1196
-
1197
-                    b.HasOne("UnivateProperties_API.Model.Timeshare.Status", "Status")
1198
-                        .WithMany()
1199
-                        .HasForeignKey("StatusId");
1200
-
1201
-                    b.HasOne("UnivateProperties_API.Model.Region.Suburb", "Suburb")
1202
-                        .WithMany()
1203
-                        .HasForeignKey("SuburbId")
1204
-                        .OnDelete(DeleteBehavior.Cascade);
1205 1418
                 });
1206 1419
 
1207 1420
             modelBuilder.Entity("UnivateProperties_API.Model.Properties.PropertyImage", b =>

UnivateProperties_API/Migrations/20191014123718_Location_Templates2.cs → UnivateProperties_API/Migrations/20200625173633_Update-Database.cs Bestand weergeven

@@ -2,7 +2,7 @@
2 2
 
3 3
 namespace UnivateProperties_API.Migrations
4 4
 {
5
-    public partial class Location_Templates2 : Migration
5
+    public partial class UpdateDatabase : Migration
6 6
     {
7 7
         protected override void Up(MigrationBuilder migrationBuilder)
8 8
         {

+ 86
- 79
UnivateProperties_API/Migrations/DataContextModelSnapshot.cs Bestand weergeven

@@ -2,8 +2,8 @@
2 2
 using System;
3 3
 using Microsoft.EntityFrameworkCore;
4 4
 using Microsoft.EntityFrameworkCore.Infrastructure;
5
+using Microsoft.EntityFrameworkCore.Metadata;
5 6
 using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
6
-using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
7 7
 using UnivateProperties_API.Context;
8 8
 
9 9
 namespace UnivateProperties_API.Migrations
@@ -15,14 +15,15 @@ namespace UnivateProperties_API.Migrations
15 15
         {
16 16
 #pragma warning disable 612, 618
17 17
             modelBuilder
18
-                .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn)
19
-                .HasAnnotation("ProductVersion", "2.2.4-servicing-10062")
20
-                .HasAnnotation("Relational:MaxIdentifierLength", 63);
18
+                .HasAnnotation("ProductVersion", "2.2.0-rtm-35687")
19
+                .HasAnnotation("Relational:MaxIdentifierLength", 128)
20
+                .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
21 21
 
22 22
             modelBuilder.Entity("UnivateProperties_API.Model.Banks.Bank", b =>
23 23
                 {
24 24
                     b.Property<int>("Id")
25
-                        .ValueGeneratedOnAdd();
25
+                        .ValueGeneratedOnAdd()
26
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
26 27
 
27 28
                     b.Property<DateTime>("Created");
28 29
 
@@ -44,7 +45,8 @@ namespace UnivateProperties_API.Migrations
44 45
             modelBuilder.Entity("UnivateProperties_API.Model.Banks.BankAccount", b =>
45 46
                 {
46 47
                     b.Property<int>("Id")
47
-                        .ValueGeneratedOnAdd();
48
+                        .ValueGeneratedOnAdd()
49
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
48 50
 
49 51
                     b.Property<string>("AccountHolder");
50 52
 
@@ -74,7 +76,8 @@ namespace UnivateProperties_API.Migrations
74 76
             modelBuilder.Entity("UnivateProperties_API.Model.Campaigns.Campaign", b =>
75 77
                 {
76 78
                     b.Property<int>("Id")
77
-                        .ValueGeneratedOnAdd();
79
+                        .ValueGeneratedOnAdd()
80
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
78 81
 
79 82
                     b.Property<string>("Body");
80 83
 
@@ -106,7 +109,8 @@ namespace UnivateProperties_API.Migrations
106 109
             modelBuilder.Entity("UnivateProperties_API.Model.Campaigns.CampaignItem", b =>
107 110
                 {
108 111
                     b.Property<int>("Id")
109
-                        .ValueGeneratedOnAdd();
112
+                        .ValueGeneratedOnAdd()
113
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
110 114
 
111 115
                     b.Property<int>("CampaignId");
112 116
 
@@ -134,7 +138,8 @@ namespace UnivateProperties_API.Migrations
134 138
             modelBuilder.Entity("UnivateProperties_API.Model.Campaigns.CampaignItemPlaceHolder", b =>
135 139
                 {
136 140
                     b.Property<int>("Id")
137
-                        .ValueGeneratedOnAdd();
141
+                        .ValueGeneratedOnAdd()
142
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
138 143
 
139 144
                     b.Property<int>("CampaignItemId");
140 145
 
@@ -160,7 +165,8 @@ namespace UnivateProperties_API.Migrations
160 165
             modelBuilder.Entity("UnivateProperties_API.Model.Campaigns.CampaignPlaceHolder", b =>
161 166
                 {
162 167
                     b.Property<int>("Id")
163
-                        .ValueGeneratedOnAdd();
168
+                        .ValueGeneratedOnAdd()
169
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
164 170
 
165 171
                     b.Property<string>("BoundTo");
166 172
 
@@ -192,7 +198,8 @@ namespace UnivateProperties_API.Migrations
192 198
             modelBuilder.Entity("UnivateProperties_API.Model.Communication.Email", b =>
193 199
                 {
194 200
                     b.Property<int>("Id")
195
-                        .ValueGeneratedOnAdd();
201
+                        .ValueGeneratedOnAdd()
202
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
196 203
 
197 204
                     b.Property<string>("BCC");
198 205
 
@@ -230,7 +237,8 @@ namespace UnivateProperties_API.Migrations
230 237
             modelBuilder.Entity("UnivateProperties_API.Model.Communication.PlaceHolder", b =>
231 238
                 {
232 239
                     b.Property<int>("Id")
233
-                        .ValueGeneratedOnAdd();
240
+                        .ValueGeneratedOnAdd()
241
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
234 242
 
235 243
                     b.Property<string>("BoundTo");
236 244
 
@@ -260,7 +268,8 @@ namespace UnivateProperties_API.Migrations
260 268
             modelBuilder.Entity("UnivateProperties_API.Model.Communication.SMTPAccount", b =>
261 269
                 {
262 270
                     b.Property<int>("Id")
263
-                        .ValueGeneratedOnAdd();
271
+                        .ValueGeneratedOnAdd()
272
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
264 273
 
265 274
                     b.Property<string>("Address");
266 275
 
@@ -288,7 +297,8 @@ namespace UnivateProperties_API.Migrations
288 297
             modelBuilder.Entity("UnivateProperties_API.Model.Communication.SMTPHost", b =>
289 298
                 {
290 299
                     b.Property<int>("Id")
291
-                        .ValueGeneratedOnAdd();
300
+                        .ValueGeneratedOnAdd()
301
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
292 302
 
293 303
                     b.Property<DateTime>("Created");
294 304
 
@@ -316,7 +326,8 @@ namespace UnivateProperties_API.Migrations
316 326
             modelBuilder.Entity("UnivateProperties_API.Model.Communication.Template", b =>
317 327
                 {
318 328
                     b.Property<int>("Id")
319
-                        .ValueGeneratedOnAdd();
329
+                        .ValueGeneratedOnAdd()
330
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
320 331
 
321 332
                     b.Property<string>("Body");
322 333
 
@@ -344,7 +355,8 @@ namespace UnivateProperties_API.Migrations
344 355
             modelBuilder.Entity("UnivateProperties_API.Model.Financial.Payment", b =>
345 356
                 {
346 357
                     b.Property<int>("Id")
347
-                        .ValueGeneratedOnAdd();
358
+                        .ValueGeneratedOnAdd()
359
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
348 360
 
349 361
                     b.Property<decimal>("Amount");
350 362
 
@@ -380,7 +392,8 @@ namespace UnivateProperties_API.Migrations
380 392
             modelBuilder.Entity("UnivateProperties_API.Model.Logging.SearchLog", b =>
381 393
                 {
382 394
                     b.Property<int>("Id")
383
-                        .ValueGeneratedOnAdd();
395
+                        .ValueGeneratedOnAdd()
396
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
384 397
 
385 398
                     b.Property<DateTime>("Created");
386 399
 
@@ -402,7 +415,8 @@ namespace UnivateProperties_API.Migrations
402 415
             modelBuilder.Entity("UnivateProperties_API.Model.Misc.Address", b =>
403 416
                 {
404 417
                     b.Property<int>("Id")
405
-                        .ValueGeneratedOnAdd();
418
+                        .ValueGeneratedOnAdd()
419
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
406 420
 
407 421
                     b.Property<string>("City");
408 422
 
@@ -436,7 +450,8 @@ namespace UnivateProperties_API.Migrations
436 450
             modelBuilder.Entity("UnivateProperties_API.Model.Misc.Carousel", b =>
437 451
                 {
438 452
                     b.Property<int>("Id")
439
-                        .ValueGeneratedOnAdd();
453
+                        .ValueGeneratedOnAdd()
454
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
440 455
 
441 456
                     b.Property<DateTime>("Created");
442 457
 
@@ -474,7 +489,8 @@ namespace UnivateProperties_API.Migrations
474 489
             modelBuilder.Entity("UnivateProperties_API.Model.Misc.Location", b =>
475 490
                 {
476 491
                     b.Property<int>("Id")
477
-                        .ValueGeneratedOnAdd();
492
+                        .ValueGeneratedOnAdd()
493
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
478 494
 
479 495
                     b.Property<DateTime>("Created");
480 496
 
@@ -496,7 +512,8 @@ namespace UnivateProperties_API.Migrations
496 512
             modelBuilder.Entity("UnivateProperties_API.Model.Misc.PlaceHolderFormat", b =>
497 513
                 {
498 514
                     b.Property<int>("Id")
499
-                        .ValueGeneratedOnAdd();
515
+                        .ValueGeneratedOnAdd()
516
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
500 517
 
501 518
                     b.Property<DateTime>("Created");
502 519
 
@@ -518,7 +535,8 @@ namespace UnivateProperties_API.Migrations
518 535
             modelBuilder.Entity("UnivateProperties_API.Model.ProcessFlow.BidItem", b =>
519 536
                 {
520 537
                     b.Property<int>("Id")
521
-                        .ValueGeneratedOnAdd();
538
+                        .ValueGeneratedOnAdd()
539
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
522 540
 
523 541
                     b.Property<double>("Amount");
524 542
 
@@ -558,7 +576,8 @@ namespace UnivateProperties_API.Migrations
558 576
             modelBuilder.Entity("UnivateProperties_API.Model.ProcessFlow.ProcessFlow", b =>
559 577
                 {
560 578
                     b.Property<int>("Id")
561
-                        .ValueGeneratedOnAdd();
579
+                        .ValueGeneratedOnAdd()
580
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
562 581
 
563 582
                     b.Property<DateTime>("Created");
564 583
 
@@ -588,7 +607,8 @@ namespace UnivateProperties_API.Migrations
588 607
             modelBuilder.Entity("UnivateProperties_API.Model.Properties.Property", b =>
589 608
                 {
590 609
                     b.Property<int>("Id")
591
-                        .ValueGeneratedOnAdd();
610
+                        .ValueGeneratedOnAdd()
611
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
592 612
 
593 613
                     b.Property<string>("AddressLine1");
594 614
 
@@ -654,25 +674,16 @@ namespace UnivateProperties_API.Migrations
654 674
 
655 675
                     b.HasIndex("AgentId");
656 676
 
657
-                    b.HasIndex("CityId");
658
-
659 677
                     b.HasIndex("OwnerId");
660 678
 
661
-                    b.HasIndex("PropertyTypeId");
662
-
663
-                    b.HasIndex("ProvinceId");
664
-
665
-                    b.HasIndex("StatusId");
666
-
667
-                    b.HasIndex("SuburbId");
668
-
669 679
                     b.ToTable("Properties");
670 680
                 });
671 681
 
672 682
             modelBuilder.Entity("UnivateProperties_API.Model.Properties.PropertyImage", b =>
673 683
                 {
674 684
                     b.Property<int>("Id")
675
-                        .ValueGeneratedOnAdd();
685
+                        .ValueGeneratedOnAdd()
686
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
676 687
 
677 688
                     b.Property<DateTime>("Created");
678 689
 
@@ -698,7 +709,8 @@ namespace UnivateProperties_API.Migrations
698 709
             modelBuilder.Entity("UnivateProperties_API.Model.Properties.PropertyType", b =>
699 710
                 {
700 711
                     b.Property<int>("Id")
701
-                        .ValueGeneratedOnAdd();
712
+                        .ValueGeneratedOnAdd()
713
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
702 714
 
703 715
                     b.Property<DateTime>("Created");
704 716
 
@@ -720,7 +732,8 @@ namespace UnivateProperties_API.Migrations
720 732
             modelBuilder.Entity("UnivateProperties_API.Model.Properties.PropertyUserField", b =>
721 733
                 {
722 734
                     b.Property<int>("Id")
723
-                        .ValueGeneratedOnAdd();
735
+                        .ValueGeneratedOnAdd()
736
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
724 737
 
725 738
                     b.Property<DateTime>("Created");
726 739
 
@@ -750,7 +763,8 @@ namespace UnivateProperties_API.Migrations
750 763
             modelBuilder.Entity("UnivateProperties_API.Model.Properties.UserDefinedField", b =>
751 764
                 {
752 765
                     b.Property<int>("Id")
753
-                        .ValueGeneratedOnAdd();
766
+                        .ValueGeneratedOnAdd()
767
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
754 768
 
755 769
                     b.Property<DateTime>("Created");
756 770
 
@@ -778,7 +792,8 @@ namespace UnivateProperties_API.Migrations
778 792
             modelBuilder.Entity("UnivateProperties_API.Model.Properties.UserDefinedGroup", b =>
779 793
                 {
780 794
                     b.Property<int>("Id")
781
-                        .ValueGeneratedOnAdd();
795
+                        .ValueGeneratedOnAdd()
796
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
782 797
 
783 798
                     b.Property<DateTime>("Created");
784 799
 
@@ -802,7 +817,8 @@ namespace UnivateProperties_API.Migrations
802 817
             modelBuilder.Entity("UnivateProperties_API.Model.Region.City", b =>
803 818
                 {
804 819
                     b.Property<int>("Id")
805
-                        .ValueGeneratedOnAdd();
820
+                        .ValueGeneratedOnAdd()
821
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
806 822
 
807 823
                     b.Property<string>("Code");
808 824
 
@@ -828,7 +844,8 @@ namespace UnivateProperties_API.Migrations
828 844
             modelBuilder.Entity("UnivateProperties_API.Model.Region.Province", b =>
829 845
                 {
830 846
                     b.Property<int>("Id")
831
-                        .ValueGeneratedOnAdd();
847
+                        .ValueGeneratedOnAdd()
848
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
832 849
 
833 850
                     b.Property<string>("Code");
834 851
 
@@ -850,7 +867,8 @@ namespace UnivateProperties_API.Migrations
850 867
             modelBuilder.Entity("UnivateProperties_API.Model.Region.Suburb", b =>
851 868
                 {
852 869
                     b.Property<int>("Id")
853
-                        .ValueGeneratedOnAdd();
870
+                        .ValueGeneratedOnAdd()
871
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
854 872
 
855 873
                     b.Property<int>("CityId");
856 874
 
@@ -876,7 +894,8 @@ namespace UnivateProperties_API.Migrations
876 894
             modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.Season", b =>
877 895
                 {
878 896
                     b.Property<int>("Id")
879
-                        .ValueGeneratedOnAdd();
897
+                        .ValueGeneratedOnAdd()
898
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
880 899
 
881 900
                     b.Property<DateTime>("Created");
882 901
 
@@ -896,7 +915,8 @@ namespace UnivateProperties_API.Migrations
896 915
             modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.Status", b =>
897 916
                 {
898 917
                     b.Property<int>("Id")
899
-                        .ValueGeneratedOnAdd();
918
+                        .ValueGeneratedOnAdd()
919
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
900 920
 
901 921
                     b.Property<string>("Code");
902 922
 
@@ -920,7 +940,8 @@ namespace UnivateProperties_API.Migrations
920 940
             modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.TimeshareWeek", b =>
921 941
                 {
922 942
                     b.Property<int>("Id")
923
-                        .ValueGeneratedOnAdd();
943
+                        .ValueGeneratedOnAdd()
944
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
924 945
 
925 946
                     b.Property<int?>("AgencyId");
926 947
 
@@ -1006,7 +1027,8 @@ namespace UnivateProperties_API.Migrations
1006 1027
             modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.UnitConfiguration", b =>
1007 1028
                 {
1008 1029
                     b.Property<int>("Id")
1009
-                        .ValueGeneratedOnAdd();
1030
+                        .ValueGeneratedOnAdd()
1031
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
1010 1032
 
1011 1033
                     b.Property<int>("Adults");
1012 1034
 
@@ -1027,7 +1049,8 @@ namespace UnivateProperties_API.Migrations
1027 1049
                     b.HasKey("Id");
1028 1050
 
1029 1051
                     b.HasIndex("Code")
1030
-                        .IsUnique();
1052
+                        .IsUnique()
1053
+                        .HasFilter("[Code] IS NOT NULL");
1031 1054
 
1032 1055
                     b.ToTable("UnitConfigurations");
1033 1056
                 });
@@ -1035,7 +1058,8 @@ namespace UnivateProperties_API.Migrations
1035 1058
             modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.UnitConfigurationType", b =>
1036 1059
                 {
1037 1060
                     b.Property<int>("Id")
1038
-                        .ValueGeneratedOnAdd();
1061
+                        .ValueGeneratedOnAdd()
1062
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
1039 1063
 
1040 1064
                     b.Property<DateTime>("Created");
1041 1065
 
@@ -1059,7 +1083,8 @@ namespace UnivateProperties_API.Migrations
1059 1083
             modelBuilder.Entity("UnivateProperties_API.Model.Users.Agency", b =>
1060 1084
                 {
1061 1085
                     b.Property<int>("Id")
1062
-                        .ValueGeneratedOnAdd();
1086
+                        .ValueGeneratedOnAdd()
1087
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
1063 1088
 
1064 1089
                     b.Property<string>("AgencyName");
1065 1090
 
@@ -1083,7 +1108,8 @@ namespace UnivateProperties_API.Migrations
1083 1108
             modelBuilder.Entity("UnivateProperties_API.Model.Users.Agent", b =>
1084 1109
                 {
1085 1110
                     b.Property<int>("Id")
1086
-                        .ValueGeneratedOnAdd();
1111
+                        .ValueGeneratedOnAdd()
1112
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
1087 1113
 
1088 1114
                     b.Property<int?>("AgencyId");
1089 1115
 
@@ -1123,7 +1149,8 @@ namespace UnivateProperties_API.Migrations
1123 1149
             modelBuilder.Entity("UnivateProperties_API.Model.Users.Individual", b =>
1124 1150
                 {
1125 1151
                     b.Property<int>("Id")
1126
-                        .ValueGeneratedOnAdd();
1152
+                        .ValueGeneratedOnAdd()
1153
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
1127 1154
 
1128 1155
                     b.Property<int?>("AddressId");
1129 1156
 
@@ -1170,7 +1197,8 @@ namespace UnivateProperties_API.Migrations
1170 1197
                     b.HasIndex("UserId");
1171 1198
 
1172 1199
                     b.HasIndex("Telephone", "CellNumber", "Email")
1173
-                        .IsUnique();
1200
+                        .IsUnique()
1201
+                        .HasFilter("[Telephone] IS NOT NULL AND [CellNumber] IS NOT NULL AND [Email] IS NOT NULL");
1174 1202
 
1175 1203
                     b.ToTable("Individuals");
1176 1204
                 });
@@ -1178,7 +1206,8 @@ namespace UnivateProperties_API.Migrations
1178 1206
             modelBuilder.Entity("UnivateProperties_API.Model.Users.Person", b =>
1179 1207
                 {
1180 1208
                     b.Property<int>("Id")
1181
-                        .ValueGeneratedOnAdd();
1209
+                        .ValueGeneratedOnAdd()
1210
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
1182 1211
 
1183 1212
                     b.Property<string>("CellNumber");
1184 1213
 
@@ -1210,7 +1239,8 @@ namespace UnivateProperties_API.Migrations
1210 1239
             modelBuilder.Entity("UnivateProperties_API.Model.Users.User", b =>
1211 1240
                 {
1212 1241
                     b.Property<int>("Id")
1213
-                        .ValueGeneratedOnAdd();
1242
+                        .ValueGeneratedOnAdd()
1243
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
1214 1244
 
1215 1245
                     b.Property<DateTime>("Created");
1216 1246
 
@@ -1235,7 +1265,8 @@ namespace UnivateProperties_API.Migrations
1235 1265
                     b.HasKey("Id");
1236 1266
 
1237 1267
                     b.HasIndex("Username")
1238
-                        .IsUnique();
1268
+                        .IsUnique()
1269
+                        .HasFilter("[Username] IS NOT NULL");
1239 1270
 
1240 1271
                     b.ToTable("Users");
1241 1272
                 });
@@ -1379,33 +1410,9 @@ namespace UnivateProperties_API.Migrations
1379 1410
                         .WithMany("Properties")
1380 1411
                         .HasForeignKey("AgentId");
1381 1412
 
1382
-                    b.HasOne("UnivateProperties_API.Model.Region.City", "City")
1383
-                        .WithMany()
1384
-                        .HasForeignKey("CityId")
1385
-                        .OnDelete(DeleteBehavior.Cascade);
1386
-
1387 1413
                     b.HasOne("UnivateProperties_API.Model.Users.Individual", "Owner")
1388 1414
                         .WithMany("Properties")
1389 1415
                         .HasForeignKey("OwnerId");
1390
-
1391
-                    b.HasOne("UnivateProperties_API.Model.Properties.PropertyType", "PropertyType")
1392
-                        .WithMany()
1393
-                        .HasForeignKey("PropertyTypeId")
1394
-                        .OnDelete(DeleteBehavior.Cascade);
1395
-
1396
-                    b.HasOne("UnivateProperties_API.Model.Region.Province", "Province")
1397
-                        .WithMany()
1398
-                        .HasForeignKey("ProvinceId")
1399
-                        .OnDelete(DeleteBehavior.Cascade);
1400
-
1401
-                    b.HasOne("UnivateProperties_API.Model.Timeshare.Status", "Status")
1402
-                        .WithMany()
1403
-                        .HasForeignKey("StatusId");
1404
-
1405
-                    b.HasOne("UnivateProperties_API.Model.Region.Suburb", "Suburb")
1406
-                        .WithMany()
1407
-                        .HasForeignKey("SuburbId")
1408
-                        .OnDelete(DeleteBehavior.Cascade);
1409 1416
                 });
1410 1417
 
1411 1418
             modelBuilder.Entity("UnivateProperties_API.Model.Properties.PropertyImage", b =>

+ 12
- 7
UnivateProperties_API/Model/Properties/Property.cs Bestand weergeven

@@ -58,13 +58,18 @@ namespace UnivateProperties_API.Model.Properties
58 58
         public DateTime DateAvailable { get; set; }
59 59
         public DateTime StatusDate { get; set; }
60 60
 
61
-        public virtual PropertyType PropertyType { get; set; }
62
-        public virtual Province Province { get; set; }
63
-        public virtual City City { get; set; }
64
-        public virtual Suburb Suburb { get; set; }
65
-        public virtual Status Status { get; set; }
66
-        public virtual Individual Owner { get; set; }
67
-        public virtual Agent Agent { get; set; }
61
+        [NotMapped]
62
+        public virtual PropertyType PropertyType { get; set; }    
63
+        [NotMapped]
64
+        public Province Province { get; set; }
65
+        [NotMapped]
66
+        public City City { get; set; }
67
+        [NotMapped]
68
+        public Suburb Suburb { get; set; }
69
+        [NotMapped]
70
+        public Status Status { get; set; }        
71
+        public virtual Individual Owner { get; set; }        
72
+        public virtual Agent Agent { get; set; }        
68 73
         public virtual Agency Agency { get; set; }
69 74
 
70 75
         public ICollection<PropertyUserField> PropertyUserFields { get; set; }

+ 3
- 1
UnivateProperties_API/Program.cs Bestand weergeven

@@ -18,7 +18,9 @@ namespace UnivateProperties_API
18 18
         public static IWebHost BuildWebHost(string[] args) =>
19 19
             WebHost.CreateDefaultBuilder(args)
20 20
                 .UseStartup<Startup>()
21
-                .UseUrls("http://192.168.6.188:5000")
21
+                //.UseUrls("http://192.168.6.188:5000")
22
+                .UseUrls("http://training.provision-sa.com:113")
23
+                .UseIISIntegration()
22 24
                 .Build();
23 25
     }
24 26
 }

+ 1
- 1
UnivateProperties_API/Startup.cs Bestand weergeven

@@ -56,7 +56,7 @@ namespace UnivateProperties_API
56 56
                        .AllowAnyHeader();
57 57
             }));            
58 58
             services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
59
-            services.AddDbContext<DataContext>(o => o.UseNpgsql(Configuration.GetConnectionString("DefaultConnection")));
59
+            services.AddDbContext<DataContext>(o => o.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")));
60 60
             MyCommon.TenderUrl = Configuration.GetConnectionString("TenderConnection");
61 61
 
62 62
             var appSettingsSection = Configuration.GetSection("AppSettings");

+ 4
- 3
UnivateProperties_API/UnivateProperties_API.csproj Bestand weergeven

@@ -3,6 +3,7 @@
3 3
   <PropertyGroup>
4 4
     <TargetFramework>netcoreapp2.2</TargetFramework>
5 5
     <AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
6
+    <TargetLatestRuntimePatch>false</TargetLatestRuntimePatch>
6 7
   </PropertyGroup>
7 8
 
8 9
   <ItemGroup>
@@ -15,9 +16,9 @@
15 16
     <PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="6.0.0" />
16 17
     <PackageReference Include="Microsoft.AspNetCore.App" />
17 18
     <PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />
18
-    <PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.2.4" />
19
-    <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.4" />
20
-    <PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="2.2.4" />
19
+    <PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.2.0" />
20
+    <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.0" />
21
+    <PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="2.2.0" />
21 22
     <PackageReference Include="System.Drawing.Common" Version="4.6.0" />
22 23
   </ItemGroup>
23 24
 

+ 2
- 2
UnivateProperties_API/appsettings.json Bestand weergeven

@@ -8,8 +8,8 @@
8 8
     }
9 9
   },
10 10
   "AllowedHosts": "*",
11
-  "ConnectionStrings": {
12
-    "DefaultConnection": "Server=localhost;Port=5432;Database=UnivateDemo;User Id=postgres;Password=prov1s1on;",
11
+  "ConnectionStrings": {    
12
+    "DefaultConnection": "Data Source=192.168.0.219;Initial Catalog=UniVateDemo;Persist Security Info=True;User Id=Provision;Password=What123!;Pooling=false;",
13 13
     "TenderConnection": "http://www.unipoint-consoft.co.za/nph-srep.exe?cluvavail_test.sch&CLUB=LPA&RESORT=ALL&SUMMARY=N&HEAD=N"
14 14
   }
15 15
 }

Laden…
Annuleren
Opslaan