Browse Source

Add Migration

master
Kobus 5 years ago
parent
commit
996895b7c2

+ 0
- 40
UnivateProperties_API/Migrations/20190912055827_SearchLogStuff.cs View File

1
-using Microsoft.EntityFrameworkCore.Migrations;
2
-
3
-namespace UnivateProperties_API.Migrations
4
-{
5
-    public partial class SearchLogStuff : Migration
6
-    {
7
-        protected override void Up(MigrationBuilder migrationBuilder)
8
-        {
9
-            migrationBuilder.DropColumn(
10
-                name: "UserID",
11
-                table: "SearchLogs");
12
-
13
-            migrationBuilder.DropColumn(
14
-                name: "GCRecord",
15
-                table: "Properties");
16
-
17
-            migrationBuilder.AddColumn<string>(
18
-                name: "Type",
19
-                table: "SearchLogs",
20
-                nullable: true);
21
-        }
22
-
23
-        protected override void Down(MigrationBuilder migrationBuilder)
24
-        {
25
-            migrationBuilder.DropColumn(
26
-                name: "Type",
27
-                table: "SearchLogs");
28
-
29
-            migrationBuilder.AddColumn<int>(
30
-                name: "UserID",
31
-                table: "SearchLogs",
32
-                nullable: true);
33
-
34
-            migrationBuilder.AddColumn<int>(
35
-                name: "GCRecord",
36
-                table: "Properties",
37
-                nullable: true);
38
-        }
39
-    }
40
-}

+ 1199
- 0
UnivateProperties_API/Migrations/20191014123718_Location_Templates2.Designer.cs
File diff suppressed because it is too large
View File


+ 17
- 0
UnivateProperties_API/Migrations/20191014123718_Location_Templates2.cs View File

1
+using Microsoft.EntityFrameworkCore.Migrations;
2
+
3
+namespace UnivateProperties_API.Migrations
4
+{
5
+    public partial class Location_Templates2 : Migration
6
+    {
7
+        protected override void Up(MigrationBuilder migrationBuilder)
8
+        {
9
+
10
+        }
11
+
12
+        protected override void Down(MigrationBuilder migrationBuilder)
13
+        {
14
+
15
+        }
16
+    }
17
+}

UnivateProperties_API/Migrations/20190912055827_SearchLogStuff.Designer.cs → UnivateProperties_API/Migrations/20191014123820_Location_Templates.Designer.cs View File

10
 namespace UnivateProperties_API.Migrations
10
 namespace UnivateProperties_API.Migrations
11
 {
11
 {
12
     [DbContext(typeof(DataContext))]
12
     [DbContext(typeof(DataContext))]
13
-    [Migration("20190912055827_SearchLogStuff")]
14
-    partial class SearchLogStuff
13
+    [Migration("20191014123820_Location_Templates")]
14
+    partial class Location_Templates
15
     {
15
     {
16
         protected override void BuildTargetModel(ModelBuilder modelBuilder)
16
         protected override void BuildTargetModel(ModelBuilder modelBuilder)
17
         {
17
         {
28
 
28
 
29
                     b.Property<DateTime>("Created");
29
                     b.Property<DateTime>("Created");
30
 
30
 
31
+                    b.Property<bool>("IsDeleted");
32
+
31
                     b.Property<DateTime>("Modified");
33
                     b.Property<DateTime>("Modified");
32
 
34
 
33
                     b.Property<string>("ModifiedBy");
35
                     b.Property<string>("ModifiedBy");
54
 
56
 
55
                     b.Property<DateTime>("Created");
57
                     b.Property<DateTime>("Created");
56
 
58
 
59
+                    b.Property<bool>("IsDeleted");
60
+
57
                     b.Property<DateTime>("Modified");
61
                     b.Property<DateTime>("Modified");
58
 
62
 
59
                     b.Property<string>("ModifiedBy");
63
                     b.Property<string>("ModifiedBy");
86
 
90
 
87
                     b.Property<bool>("IsBodyHtml");
91
                     b.Property<bool>("IsBodyHtml");
88
 
92
 
93
+                    b.Property<bool>("IsDeleted");
94
+
89
                     b.Property<DateTime>("Modified");
95
                     b.Property<DateTime>("Modified");
90
 
96
 
91
                     b.Property<string>("ModifiedBy");
97
                     b.Property<string>("ModifiedBy");
105
                     b.ToTable("Emails");
111
                     b.ToTable("Emails");
106
                 });
112
                 });
107
 
113
 
114
+            modelBuilder.Entity("UnivateProperties_API.Model.Communication.PlaceHolder", b =>
115
+                {
116
+                    b.Property<int>("Id")
117
+                        .ValueGeneratedOnAdd();
118
+
119
+                    b.Property<string>("BoundTo");
120
+
121
+                    b.Property<string>("Name");
122
+
123
+                    b.Property<int>("TemplateId");
124
+
125
+                    b.HasKey("Id");
126
+
127
+                    b.HasIndex("TemplateId");
128
+
129
+                    b.ToTable("PlaceHolders");
130
+                });
131
+
108
             modelBuilder.Entity("UnivateProperties_API.Model.Communication.SMTPAccount", b =>
132
             modelBuilder.Entity("UnivateProperties_API.Model.Communication.SMTPAccount", b =>
109
                 {
133
                 {
110
                     b.Property<int>("Id")
134
                     b.Property<int>("Id")
116
 
140
 
117
                     b.Property<string>("DisplayName");
141
                     b.Property<string>("DisplayName");
118
 
142
 
143
+                    b.Property<bool>("IsDeleted");
144
+
119
                     b.Property<DateTime>("Modified");
145
                     b.Property<DateTime>("Modified");
120
 
146
 
121
                     b.Property<string>("ModifiedBy");
147
                     b.Property<string>("ModifiedBy");
138
 
164
 
139
                     b.Property<string>("Host");
165
                     b.Property<string>("Host");
140
 
166
 
167
+                    b.Property<bool>("IsDeleted");
168
+
141
                     b.Property<DateTime>("Modified");
169
                     b.Property<DateTime>("Modified");
142
 
170
 
143
                     b.Property<string>("ModifiedBy");
171
                     b.Property<string>("ModifiedBy");
155
                     b.ToTable("Hosts");
183
                     b.ToTable("Hosts");
156
                 });
184
                 });
157
 
185
 
186
+            modelBuilder.Entity("UnivateProperties_API.Model.Communication.Template", b =>
187
+                {
188
+                    b.Property<int>("Id")
189
+                        .ValueGeneratedOnAdd();
190
+
191
+                    b.Property<string>("Body");
192
+
193
+                    b.Property<DateTime>("Created");
194
+
195
+                    b.Property<bool>("IsDeleted");
196
+
197
+                    b.Property<DateTime>("Modified");
198
+
199
+                    b.Property<string>("ModifiedBy");
200
+
201
+                    b.Property<string>("Name");
202
+
203
+                    b.Property<string>("Subject");
204
+
205
+                    b.HasKey("Id");
206
+
207
+                    b.ToTable("Templates");
208
+                });
209
+
158
             modelBuilder.Entity("UnivateProperties_API.Model.Logging.SearchLog", b =>
210
             modelBuilder.Entity("UnivateProperties_API.Model.Logging.SearchLog", b =>
159
                 {
211
                 {
160
                     b.Property<int>("Id")
212
                     b.Property<int>("Id")
162
 
214
 
163
                     b.Property<DateTime>("Created");
215
                     b.Property<DateTime>("Created");
164
 
216
 
217
+                    b.Property<bool>("IsDeleted");
218
+
165
                     b.Property<DateTime>("Modified");
219
                     b.Property<DateTime>("Modified");
166
 
220
 
167
                     b.Property<string>("ModifiedBy");
221
                     b.Property<string>("ModifiedBy");
184
 
238
 
185
                     b.Property<DateTime>("Created");
239
                     b.Property<DateTime>("Created");
186
 
240
 
241
+                    b.Property<bool>("IsDeleted");
242
+
187
                     b.Property<DateTime>("Modified");
243
                     b.Property<DateTime>("Modified");
188
 
244
 
189
                     b.Property<string>("ModifiedBy");
245
                     b.Property<string>("ModifiedBy");
201
                     b.ToTable("Addresses");
257
                     b.ToTable("Addresses");
202
                 });
258
                 });
203
 
259
 
260
+            modelBuilder.Entity("UnivateProperties_API.Model.Misc.Location", b =>
261
+                {
262
+                    b.Property<int>("Id")
263
+                        .ValueGeneratedOnAdd();
264
+
265
+                    b.Property<DateTime>("Created");
266
+
267
+                    b.Property<bool>("IsDeleted");
268
+
269
+                    b.Property<bool>("IsTesting");
270
+
271
+                    b.Property<DateTime>("Modified");
272
+
273
+                    b.Property<string>("ModifiedBy");
274
+
275
+                    b.Property<string>("PropertyImageLocation");
276
+
277
+                    b.HasKey("Id");
278
+
279
+                    b.ToTable("Location");
280
+                });
281
+
204
             modelBuilder.Entity("UnivateProperties_API.Model.ProcessFlow.BidItem", b =>
282
             modelBuilder.Entity("UnivateProperties_API.Model.ProcessFlow.BidItem", b =>
205
                 {
283
                 {
206
                     b.Property<int>("Id")
284
                     b.Property<int>("Id")
216
 
294
 
217
                     b.Property<string>("DeclinedReason");
295
                     b.Property<string>("DeclinedReason");
218
 
296
 
297
+                    b.Property<bool>("IsDeleted");
298
+
219
                     b.Property<DateTime>("Modified");
299
                     b.Property<DateTime>("Modified");
220
 
300
 
221
                     b.Property<string>("ModifiedBy");
301
                     b.Property<string>("ModifiedBy");
246
 
326
 
247
                     b.Property<DateTime>("Created");
327
                     b.Property<DateTime>("Created");
248
 
328
 
329
+                    b.Property<bool>("IsDeleted");
330
+
249
                     b.Property<DateTime>("Modified");
331
                     b.Property<DateTime>("Modified");
250
 
332
 
251
                     b.Property<string>("ModifiedBy");
333
                     b.Property<string>("ModifiedBy");
288
 
370
 
289
                     b.Property<string>("Description");
371
                     b.Property<string>("Description");
290
 
372
 
373
+                    b.Property<bool>("IsDeleted");
374
+
291
                     b.Property<bool>("IsSale");
375
                     b.Property<bool>("IsSale");
292
 
376
 
293
                     b.Property<DateTime>("Modified");
377
                     b.Property<DateTime>("Modified");
350
 
434
 
351
                     b.Property<bool>("IsDefault");
435
                     b.Property<bool>("IsDefault");
352
 
436
 
437
+                    b.Property<bool>("IsDeleted");
438
+
353
                     b.Property<DateTime>("Modified");
439
                     b.Property<DateTime>("Modified");
354
 
440
 
355
                     b.Property<string>("ModifiedBy");
441
                     b.Property<string>("ModifiedBy");
372
 
458
 
373
                     b.Property<string>("Description");
459
                     b.Property<string>("Description");
374
 
460
 
461
+                    b.Property<bool>("IsDeleted");
462
+
375
                     b.Property<DateTime>("Modified");
463
                     b.Property<DateTime>("Modified");
376
 
464
 
377
                     b.Property<string>("ModifiedBy");
465
                     b.Property<string>("ModifiedBy");
392
 
480
 
393
                     b.Property<string>("Description");
481
                     b.Property<string>("Description");
394
 
482
 
483
+                    b.Property<bool>("IsDeleted");
484
+
395
                     b.Property<DateTime>("Modified");
485
                     b.Property<DateTime>("Modified");
396
 
486
 
397
                     b.Property<string>("ModifiedBy");
487
                     b.Property<string>("ModifiedBy");
424
 
514
 
425
                     b.Property<int>("GroupId");
515
                     b.Property<int>("GroupId");
426
 
516
 
517
+                    b.Property<bool>("IsDeleted");
518
+
427
                     b.Property<DateTime>("Modified");
519
                     b.Property<DateTime>("Modified");
428
 
520
 
429
                     b.Property<string>("ModifiedBy");
521
                     b.Property<string>("ModifiedBy");
446
 
538
 
447
                     b.Property<string>("Description");
539
                     b.Property<string>("Description");
448
 
540
 
541
+                    b.Property<bool>("IsDeleted");
542
+
449
                     b.Property<DateTime>("Modified");
543
                     b.Property<DateTime>("Modified");
450
 
544
 
451
                     b.Property<string>("ModifiedBy");
545
                     b.Property<string>("ModifiedBy");
470
 
564
 
471
                     b.Property<string>("Description");
565
                     b.Property<string>("Description");
472
 
566
 
567
+                    b.Property<bool>("IsDeleted");
568
+
473
                     b.Property<DateTime>("Modified");
569
                     b.Property<DateTime>("Modified");
474
 
570
 
475
                     b.Property<string>("ModifiedBy");
571
                     b.Property<string>("ModifiedBy");
494
 
590
 
495
                     b.Property<string>("Description");
591
                     b.Property<string>("Description");
496
 
592
 
593
+                    b.Property<bool>("IsDeleted");
594
+
497
                     b.Property<DateTime>("Modified");
595
                     b.Property<DateTime>("Modified");
498
 
596
 
499
                     b.Property<string>("ModifiedBy");
597
                     b.Property<string>("ModifiedBy");
514
 
612
 
515
                     b.Property<string>("Description");
613
                     b.Property<string>("Description");
516
 
614
 
615
+                    b.Property<bool>("IsDeleted");
616
+
517
                     b.Property<DateTime>("Modified");
617
                     b.Property<DateTime>("Modified");
518
 
618
 
519
                     b.Property<string>("ModifiedBy");
619
                     b.Property<string>("ModifiedBy");
534
 
634
 
535
                     b.Property<DateTime>("Created");
635
                     b.Property<DateTime>("Created");
536
 
636
 
637
+                    b.Property<bool>("IsDeleted");
638
+
537
                     b.Property<DateTime>("Modified");
639
                     b.Property<DateTime>("Modified");
538
 
640
 
539
                     b.Property<string>("ModifiedBy");
641
                     b.Property<string>("ModifiedBy");
556
 
658
 
557
                     b.Property<string>("Description");
659
                     b.Property<string>("Description");
558
 
660
 
661
+                    b.Property<bool>("IsDeleted");
662
+
559
                     b.Property<DateTime>("Modified");
663
                     b.Property<DateTime>("Modified");
560
 
664
 
561
                     b.Property<string>("ModifiedBy");
665
                     b.Property<string>("ModifiedBy");
590
 
694
 
591
                     b.Property<DateTime>("DepartureDate");
695
                     b.Property<DateTime>("DepartureDate");
592
 
696
 
697
+                    b.Property<bool>("IsDeleted");
698
+
593
                     b.Property<bool>("LeviesPaidInFull");
699
                     b.Property<bool>("LeviesPaidInFull");
594
 
700
 
595
                     b.Property<double>("LevyAmount");
701
                     b.Property<double>("LevyAmount");
660
 
766
 
661
                     b.Property<DateTime>("Created");
767
                     b.Property<DateTime>("Created");
662
 
768
 
769
+                    b.Property<bool>("IsDeleted");
770
+
663
                     b.Property<DateTime>("Modified");
771
                     b.Property<DateTime>("Modified");
664
 
772
 
665
                     b.Property<string>("ModifiedBy");
773
                     b.Property<string>("ModifiedBy");
681
 
789
 
682
                     b.Property<string>("Description");
790
                     b.Property<string>("Description");
683
 
791
 
792
+                    b.Property<bool>("IsDeleted");
793
+
684
                     b.Property<DateTime>("Modified");
794
                     b.Property<DateTime>("Modified");
685
 
795
 
686
                     b.Property<string>("ModifiedBy");
796
                     b.Property<string>("ModifiedBy");
707
 
817
 
708
                     b.Property<string>("EAABEFFCNumber");
818
                     b.Property<string>("EAABEFFCNumber");
709
 
819
 
820
+                    b.Property<bool>("IsDeleted");
821
+
710
                     b.Property<DateTime>("Modified");
822
                     b.Property<DateTime>("Modified");
711
 
823
 
712
                     b.Property<string>("ModifiedBy");
824
                     b.Property<string>("ModifiedBy");
729
 
841
 
730
                     b.Property<string>("Email");
842
                     b.Property<string>("Email");
731
 
843
 
844
+                    b.Property<bool>("IsDeleted");
845
+
732
                     b.Property<DateTime>("Modified");
846
                     b.Property<DateTime>("Modified");
733
 
847
 
734
                     b.Property<string>("ModifiedBy");
848
                     b.Property<string>("ModifiedBy");
769
 
883
 
770
                     b.Property<string>("IncomeTaxNumber");
884
                     b.Property<string>("IncomeTaxNumber");
771
 
885
 
886
+                    b.Property<bool>("IsDeleted");
887
+
772
                     b.Property<string>("MaritalStatus");
888
                     b.Property<string>("MaritalStatus");
773
 
889
 
774
                     b.Property<DateTime>("Modified");
890
                     b.Property<DateTime>("Modified");
789
 
905
 
790
                     b.HasIndex("UserId");
906
                     b.HasIndex("UserId");
791
 
907
 
908
+                    b.HasIndex("Telephone", "CellNumber", "Email")
909
+                        .IsUnique();
910
+
792
                     b.ToTable("Individuals");
911
                     b.ToTable("Individuals");
793
                 });
912
                 });
794
 
913
 
914
+            modelBuilder.Entity("UnivateProperties_API.Model.Users.Person", b =>
915
+                {
916
+                    b.Property<int>("Id")
917
+                        .ValueGeneratedOnAdd();
918
+
919
+                    b.Property<string>("CellNumber");
920
+
921
+                    b.Property<DateTime>("Created");
922
+
923
+                    b.Property<string>("Email");
924
+
925
+                    b.Property<bool>("IsDeleted");
926
+
927
+                    b.Property<DateTime>("Modified");
928
+
929
+                    b.Property<string>("ModifiedBy");
930
+
931
+                    b.Property<string>("Name");
932
+
933
+                    b.Property<string>("Surname");
934
+
935
+                    b.Property<string>("Telephone");
936
+
937
+                    b.Property<int?>("UserId");
938
+
939
+                    b.HasKey("Id");
940
+
941
+                    b.HasIndex("UserId");
942
+
943
+                    b.ToTable("Person");
944
+                });
945
+
795
             modelBuilder.Entity("UnivateProperties_API.Model.Users.User", b =>
946
             modelBuilder.Entity("UnivateProperties_API.Model.Users.User", b =>
796
                 {
947
                 {
797
                     b.Property<int>("Id")
948
                     b.Property<int>("Id")
799
 
950
 
800
                     b.Property<DateTime>("Created");
951
                     b.Property<DateTime>("Created");
801
 
952
 
953
+                    b.Property<bool>("IsDeleted");
954
+
802
                     b.Property<DateTime>("Modified");
955
                     b.Property<DateTime>("Modified");
803
 
956
 
804
                     b.Property<string>("ModifiedBy");
957
                     b.Property<string>("ModifiedBy");
817
 
970
 
818
                     b.HasKey("Id");
971
                     b.HasKey("Id");
819
 
972
 
973
+                    b.HasIndex("Username")
974
+                        .IsUnique();
975
+
820
                     b.ToTable("Users");
976
                     b.ToTable("Users");
821
                 });
977
                 });
822
 
978
 
840
                         .OnDelete(DeleteBehavior.Cascade);
996
                         .OnDelete(DeleteBehavior.Cascade);
841
                 });
997
                 });
842
 
998
 
999
+            modelBuilder.Entity("UnivateProperties_API.Model.Communication.PlaceHolder", b =>
1000
+                {
1001
+                    b.HasOne("UnivateProperties_API.Model.Communication.Template", "Template")
1002
+                        .WithMany("PlaceHolders")
1003
+                        .HasForeignKey("TemplateId")
1004
+                        .OnDelete(DeleteBehavior.Cascade);
1005
+                });
1006
+
843
             modelBuilder.Entity("UnivateProperties_API.Model.Communication.SMTPAccount", b =>
1007
             modelBuilder.Entity("UnivateProperties_API.Model.Communication.SMTPAccount", b =>
844
                 {
1008
                 {
845
                     b.HasOne("UnivateProperties_API.Model.Communication.SMTPHost", "SMTPHost")
1009
                     b.HasOne("UnivateProperties_API.Model.Communication.SMTPHost", "SMTPHost")
1022
                         .WithMany()
1186
                         .WithMany()
1023
                         .HasForeignKey("UserId");
1187
                         .HasForeignKey("UserId");
1024
                 });
1188
                 });
1189
+
1190
+            modelBuilder.Entity("UnivateProperties_API.Model.Users.Person", b =>
1191
+                {
1192
+                    b.HasOne("UnivateProperties_API.Model.Users.User", "User")
1193
+                        .WithMany()
1194
+                        .HasForeignKey("UserId");
1195
+                });
1025
 #pragma warning restore 612, 618
1196
 #pragma warning restore 612, 618
1026
         }
1197
         }
1027
     }
1198
     }

+ 107
- 0
UnivateProperties_API/Migrations/20191014123820_Location_Templates.cs View File

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

+ 78
- 0
UnivateProperties_API/Migrations/DataContextModelSnapshot.cs View File

109
                     b.ToTable("Emails");
109
                     b.ToTable("Emails");
110
                 });
110
                 });
111
 
111
 
112
+            modelBuilder.Entity("UnivateProperties_API.Model.Communication.PlaceHolder", b =>
113
+                {
114
+                    b.Property<int>("Id")
115
+                        .ValueGeneratedOnAdd();
116
+
117
+                    b.Property<string>("BoundTo");
118
+
119
+                    b.Property<string>("Name");
120
+
121
+                    b.Property<int>("TemplateId");
122
+
123
+                    b.HasKey("Id");
124
+
125
+                    b.HasIndex("TemplateId");
126
+
127
+                    b.ToTable("PlaceHolders");
128
+                });
129
+
112
             modelBuilder.Entity("UnivateProperties_API.Model.Communication.SMTPAccount", b =>
130
             modelBuilder.Entity("UnivateProperties_API.Model.Communication.SMTPAccount", b =>
113
                 {
131
                 {
114
                     b.Property<int>("Id")
132
                     b.Property<int>("Id")
163
                     b.ToTable("Hosts");
181
                     b.ToTable("Hosts");
164
                 });
182
                 });
165
 
183
 
184
+            modelBuilder.Entity("UnivateProperties_API.Model.Communication.Template", b =>
185
+                {
186
+                    b.Property<int>("Id")
187
+                        .ValueGeneratedOnAdd();
188
+
189
+                    b.Property<string>("Body");
190
+
191
+                    b.Property<DateTime>("Created");
192
+
193
+                    b.Property<bool>("IsDeleted");
194
+
195
+                    b.Property<DateTime>("Modified");
196
+
197
+                    b.Property<string>("ModifiedBy");
198
+
199
+                    b.Property<string>("Name");
200
+
201
+                    b.Property<string>("Subject");
202
+
203
+                    b.HasKey("Id");
204
+
205
+                    b.ToTable("Templates");
206
+                });
207
+
166
             modelBuilder.Entity("UnivateProperties_API.Model.Logging.SearchLog", b =>
208
             modelBuilder.Entity("UnivateProperties_API.Model.Logging.SearchLog", b =>
167
                 {
209
                 {
168
                     b.Property<int>("Id")
210
                     b.Property<int>("Id")
213
                     b.ToTable("Addresses");
255
                     b.ToTable("Addresses");
214
                 });
256
                 });
215
 
257
 
258
+            modelBuilder.Entity("UnivateProperties_API.Model.Misc.Location", b =>
259
+                {
260
+                    b.Property<int>("Id")
261
+                        .ValueGeneratedOnAdd();
262
+
263
+                    b.Property<DateTime>("Created");
264
+
265
+                    b.Property<bool>("IsDeleted");
266
+
267
+                    b.Property<bool>("IsTesting");
268
+
269
+                    b.Property<DateTime>("Modified");
270
+
271
+                    b.Property<string>("ModifiedBy");
272
+
273
+                    b.Property<string>("PropertyImageLocation");
274
+
275
+                    b.HasKey("Id");
276
+
277
+                    b.ToTable("Location");
278
+                });
279
+
216
             modelBuilder.Entity("UnivateProperties_API.Model.ProcessFlow.BidItem", b =>
280
             modelBuilder.Entity("UnivateProperties_API.Model.ProcessFlow.BidItem", b =>
217
                 {
281
                 {
218
                     b.Property<int>("Id")
282
                     b.Property<int>("Id")
839
 
903
 
840
                     b.HasIndex("UserId");
904
                     b.HasIndex("UserId");
841
 
905
 
906
+                    b.HasIndex("Telephone", "CellNumber", "Email")
907
+                        .IsUnique();
908
+
842
                     b.ToTable("Individuals");
909
                     b.ToTable("Individuals");
843
                 });
910
                 });
844
 
911
 
901
 
968
 
902
                     b.HasKey("Id");
969
                     b.HasKey("Id");
903
 
970
 
971
+                    b.HasIndex("Username")
972
+                        .IsUnique();
973
+
904
                     b.ToTable("Users");
974
                     b.ToTable("Users");
905
                 });
975
                 });
906
 
976
 
924
                         .OnDelete(DeleteBehavior.Cascade);
994
                         .OnDelete(DeleteBehavior.Cascade);
925
                 });
995
                 });
926
 
996
 
997
+            modelBuilder.Entity("UnivateProperties_API.Model.Communication.PlaceHolder", b =>
998
+                {
999
+                    b.HasOne("UnivateProperties_API.Model.Communication.Template", "Template")
1000
+                        .WithMany("PlaceHolders")
1001
+                        .HasForeignKey("TemplateId")
1002
+                        .OnDelete(DeleteBehavior.Cascade);
1003
+                });
1004
+
927
             modelBuilder.Entity("UnivateProperties_API.Model.Communication.SMTPAccount", b =>
1005
             modelBuilder.Entity("UnivateProperties_API.Model.Communication.SMTPAccount", b =>
928
                 {
1006
                 {
929
                     b.HasOne("UnivateProperties_API.Model.Communication.SMTPHost", "SMTPHost")
1007
                     b.HasOne("UnivateProperties_API.Model.Communication.SMTPHost", "SMTPHost")

Loading…
Cancel
Save