Sfoglia il codice sorgente

Removed migrations

master
Kobus 5 anni fa
parent
commit
5096fd6104

+ 0
- 767
UnivateProperties_API/Migrations/20190828083244_1124.Designer.cs Vedi File

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

+ 0
- 740
UnivateProperties_API/Migrations/20190828083244_1124.cs Vedi File

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

+ 0
- 765
UnivateProperties_API/Migrations/DataContextModelSnapshot.cs Vedi File

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

+ 4
- 0
UnivateProperties_API/UnivateProperties_API.csproj Vedi File

@@ -22,4 +22,8 @@
22 22
     <PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="2.2.4" />
23 23
   </ItemGroup>
24 24
 
25
+  <ItemGroup>
26
+    <Folder Include="Migrations\" />
27
+  </ItemGroup>
28
+
25 29
 </Project>

Loading…
Annulla
Salva