Przeglądaj źródła

Add Migration

master
Kobus 5 lat temu
rodzic
commit
996895b7c2

+ 0
- 40
UnivateProperties_API/Migrations/20190912055827_SearchLogStuff.cs Wyświetl plik

@@ -1,40 +0,0 @@
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
Plik diff jest za duży
Wyświetl plik


+ 17
- 0
UnivateProperties_API/Migrations/20191014123718_Location_Templates2.cs Wyświetl plik

@@ -0,0 +1,17 @@
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 Wyświetl plik

@@ -10,8 +10,8 @@ using UnivateProperties_API.Context;
10 10
 namespace UnivateProperties_API.Migrations
11 11
 {
12 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 16
         protected override void BuildTargetModel(ModelBuilder modelBuilder)
17 17
         {
@@ -28,6 +28,8 @@ namespace UnivateProperties_API.Migrations
28 28
 
29 29
                     b.Property<DateTime>("Created");
30 30
 
31
+                    b.Property<bool>("IsDeleted");
32
+
31 33
                     b.Property<DateTime>("Modified");
32 34
 
33 35
                     b.Property<string>("ModifiedBy");
@@ -54,6 +56,8 @@ namespace UnivateProperties_API.Migrations
54 56
 
55 57
                     b.Property<DateTime>("Created");
56 58
 
59
+                    b.Property<bool>("IsDeleted");
60
+
57 61
                     b.Property<DateTime>("Modified");
58 62
 
59 63
                     b.Property<string>("ModifiedBy");
@@ -86,6 +90,8 @@ namespace UnivateProperties_API.Migrations
86 90
 
87 91
                     b.Property<bool>("IsBodyHtml");
88 92
 
93
+                    b.Property<bool>("IsDeleted");
94
+
89 95
                     b.Property<DateTime>("Modified");
90 96
 
91 97
                     b.Property<string>("ModifiedBy");
@@ -105,6 +111,24 @@ namespace UnivateProperties_API.Migrations
105 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 132
             modelBuilder.Entity("UnivateProperties_API.Model.Communication.SMTPAccount", b =>
109 133
                 {
110 134
                     b.Property<int>("Id")
@@ -116,6 +140,8 @@ namespace UnivateProperties_API.Migrations
116 140
 
117 141
                     b.Property<string>("DisplayName");
118 142
 
143
+                    b.Property<bool>("IsDeleted");
144
+
119 145
                     b.Property<DateTime>("Modified");
120 146
 
121 147
                     b.Property<string>("ModifiedBy");
@@ -138,6 +164,8 @@ namespace UnivateProperties_API.Migrations
138 164
 
139 165
                     b.Property<string>("Host");
140 166
 
167
+                    b.Property<bool>("IsDeleted");
168
+
141 169
                     b.Property<DateTime>("Modified");
142 170
 
143 171
                     b.Property<string>("ModifiedBy");
@@ -155,6 +183,30 @@ namespace UnivateProperties_API.Migrations
155 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 210
             modelBuilder.Entity("UnivateProperties_API.Model.Logging.SearchLog", b =>
159 211
                 {
160 212
                     b.Property<int>("Id")
@@ -162,6 +214,8 @@ namespace UnivateProperties_API.Migrations
162 214
 
163 215
                     b.Property<DateTime>("Created");
164 216
 
217
+                    b.Property<bool>("IsDeleted");
218
+
165 219
                     b.Property<DateTime>("Modified");
166 220
 
167 221
                     b.Property<string>("ModifiedBy");
@@ -184,6 +238,8 @@ namespace UnivateProperties_API.Migrations
184 238
 
185 239
                     b.Property<DateTime>("Created");
186 240
 
241
+                    b.Property<bool>("IsDeleted");
242
+
187 243
                     b.Property<DateTime>("Modified");
188 244
 
189 245
                     b.Property<string>("ModifiedBy");
@@ -201,6 +257,28 @@ namespace UnivateProperties_API.Migrations
201 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 282
             modelBuilder.Entity("UnivateProperties_API.Model.ProcessFlow.BidItem", b =>
205 283
                 {
206 284
                     b.Property<int>("Id")
@@ -216,6 +294,8 @@ namespace UnivateProperties_API.Migrations
216 294
 
217 295
                     b.Property<string>("DeclinedReason");
218 296
 
297
+                    b.Property<bool>("IsDeleted");
298
+
219 299
                     b.Property<DateTime>("Modified");
220 300
 
221 301
                     b.Property<string>("ModifiedBy");
@@ -246,6 +326,8 @@ namespace UnivateProperties_API.Migrations
246 326
 
247 327
                     b.Property<DateTime>("Created");
248 328
 
329
+                    b.Property<bool>("IsDeleted");
330
+
249 331
                     b.Property<DateTime>("Modified");
250 332
 
251 333
                     b.Property<string>("ModifiedBy");
@@ -288,6 +370,8 @@ namespace UnivateProperties_API.Migrations
288 370
 
289 371
                     b.Property<string>("Description");
290 372
 
373
+                    b.Property<bool>("IsDeleted");
374
+
291 375
                     b.Property<bool>("IsSale");
292 376
 
293 377
                     b.Property<DateTime>("Modified");
@@ -350,6 +434,8 @@ namespace UnivateProperties_API.Migrations
350 434
 
351 435
                     b.Property<bool>("IsDefault");
352 436
 
437
+                    b.Property<bool>("IsDeleted");
438
+
353 439
                     b.Property<DateTime>("Modified");
354 440
 
355 441
                     b.Property<string>("ModifiedBy");
@@ -372,6 +458,8 @@ namespace UnivateProperties_API.Migrations
372 458
 
373 459
                     b.Property<string>("Description");
374 460
 
461
+                    b.Property<bool>("IsDeleted");
462
+
375 463
                     b.Property<DateTime>("Modified");
376 464
 
377 465
                     b.Property<string>("ModifiedBy");
@@ -392,6 +480,8 @@ namespace UnivateProperties_API.Migrations
392 480
 
393 481
                     b.Property<string>("Description");
394 482
 
483
+                    b.Property<bool>("IsDeleted");
484
+
395 485
                     b.Property<DateTime>("Modified");
396 486
 
397 487
                     b.Property<string>("ModifiedBy");
@@ -424,6 +514,8 @@ namespace UnivateProperties_API.Migrations
424 514
 
425 515
                     b.Property<int>("GroupId");
426 516
 
517
+                    b.Property<bool>("IsDeleted");
518
+
427 519
                     b.Property<DateTime>("Modified");
428 520
 
429 521
                     b.Property<string>("ModifiedBy");
@@ -446,6 +538,8 @@ namespace UnivateProperties_API.Migrations
446 538
 
447 539
                     b.Property<string>("Description");
448 540
 
541
+                    b.Property<bool>("IsDeleted");
542
+
449 543
                     b.Property<DateTime>("Modified");
450 544
 
451 545
                     b.Property<string>("ModifiedBy");
@@ -470,6 +564,8 @@ namespace UnivateProperties_API.Migrations
470 564
 
471 565
                     b.Property<string>("Description");
472 566
 
567
+                    b.Property<bool>("IsDeleted");
568
+
473 569
                     b.Property<DateTime>("Modified");
474 570
 
475 571
                     b.Property<string>("ModifiedBy");
@@ -494,6 +590,8 @@ namespace UnivateProperties_API.Migrations
494 590
 
495 591
                     b.Property<string>("Description");
496 592
 
593
+                    b.Property<bool>("IsDeleted");
594
+
497 595
                     b.Property<DateTime>("Modified");
498 596
 
499 597
                     b.Property<string>("ModifiedBy");
@@ -514,6 +612,8 @@ namespace UnivateProperties_API.Migrations
514 612
 
515 613
                     b.Property<string>("Description");
516 614
 
615
+                    b.Property<bool>("IsDeleted");
616
+
517 617
                     b.Property<DateTime>("Modified");
518 618
 
519 619
                     b.Property<string>("ModifiedBy");
@@ -534,6 +634,8 @@ namespace UnivateProperties_API.Migrations
534 634
 
535 635
                     b.Property<DateTime>("Created");
536 636
 
637
+                    b.Property<bool>("IsDeleted");
638
+
537 639
                     b.Property<DateTime>("Modified");
538 640
 
539 641
                     b.Property<string>("ModifiedBy");
@@ -556,6 +658,8 @@ namespace UnivateProperties_API.Migrations
556 658
 
557 659
                     b.Property<string>("Description");
558 660
 
661
+                    b.Property<bool>("IsDeleted");
662
+
559 663
                     b.Property<DateTime>("Modified");
560 664
 
561 665
                     b.Property<string>("ModifiedBy");
@@ -590,6 +694,8 @@ namespace UnivateProperties_API.Migrations
590 694
 
591 695
                     b.Property<DateTime>("DepartureDate");
592 696
 
697
+                    b.Property<bool>("IsDeleted");
698
+
593 699
                     b.Property<bool>("LeviesPaidInFull");
594 700
 
595 701
                     b.Property<double>("LevyAmount");
@@ -660,6 +766,8 @@ namespace UnivateProperties_API.Migrations
660 766
 
661 767
                     b.Property<DateTime>("Created");
662 768
 
769
+                    b.Property<bool>("IsDeleted");
770
+
663 771
                     b.Property<DateTime>("Modified");
664 772
 
665 773
                     b.Property<string>("ModifiedBy");
@@ -681,6 +789,8 @@ namespace UnivateProperties_API.Migrations
681 789
 
682 790
                     b.Property<string>("Description");
683 791
 
792
+                    b.Property<bool>("IsDeleted");
793
+
684 794
                     b.Property<DateTime>("Modified");
685 795
 
686 796
                     b.Property<string>("ModifiedBy");
@@ -707,6 +817,8 @@ namespace UnivateProperties_API.Migrations
707 817
 
708 818
                     b.Property<string>("EAABEFFCNumber");
709 819
 
820
+                    b.Property<bool>("IsDeleted");
821
+
710 822
                     b.Property<DateTime>("Modified");
711 823
 
712 824
                     b.Property<string>("ModifiedBy");
@@ -729,6 +841,8 @@ namespace UnivateProperties_API.Migrations
729 841
 
730 842
                     b.Property<string>("Email");
731 843
 
844
+                    b.Property<bool>("IsDeleted");
845
+
732 846
                     b.Property<DateTime>("Modified");
733 847
 
734 848
                     b.Property<string>("ModifiedBy");
@@ -769,6 +883,8 @@ namespace UnivateProperties_API.Migrations
769 883
 
770 884
                     b.Property<string>("IncomeTaxNumber");
771 885
 
886
+                    b.Property<bool>("IsDeleted");
887
+
772 888
                     b.Property<string>("MaritalStatus");
773 889
 
774 890
                     b.Property<DateTime>("Modified");
@@ -789,9 +905,44 @@ namespace UnivateProperties_API.Migrations
789 905
 
790 906
                     b.HasIndex("UserId");
791 907
 
908
+                    b.HasIndex("Telephone", "CellNumber", "Email")
909
+                        .IsUnique();
910
+
792 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 946
             modelBuilder.Entity("UnivateProperties_API.Model.Users.User", b =>
796 947
                 {
797 948
                     b.Property<int>("Id")
@@ -799,6 +950,8 @@ namespace UnivateProperties_API.Migrations
799 950
 
800 951
                     b.Property<DateTime>("Created");
801 952
 
953
+                    b.Property<bool>("IsDeleted");
954
+
802 955
                     b.Property<DateTime>("Modified");
803 956
 
804 957
                     b.Property<string>("ModifiedBy");
@@ -817,6 +970,9 @@ namespace UnivateProperties_API.Migrations
817 970
 
818 971
                     b.HasKey("Id");
819 972
 
973
+                    b.HasIndex("Username")
974
+                        .IsUnique();
975
+
820 976
                     b.ToTable("Users");
821 977
                 });
822 978
 
@@ -840,6 +996,14 @@ namespace UnivateProperties_API.Migrations
840 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 1007
             modelBuilder.Entity("UnivateProperties_API.Model.Communication.SMTPAccount", b =>
844 1008
                 {
845 1009
                     b.HasOne("UnivateProperties_API.Model.Communication.SMTPHost", "SMTPHost")
@@ -1022,6 +1186,13 @@ namespace UnivateProperties_API.Migrations
1022 1186
                         .WithMany()
1023 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 1196
 #pragma warning restore 612, 618
1026 1197
         }
1027 1198
     }

+ 107
- 0
UnivateProperties_API/Migrations/20191014123820_Location_Templates.cs Wyświetl plik

@@ -0,0 +1,107 @@
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 Wyświetl plik

@@ -109,6 +109,24 @@ namespace UnivateProperties_API.Migrations
109 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 130
             modelBuilder.Entity("UnivateProperties_API.Model.Communication.SMTPAccount", b =>
113 131
                 {
114 132
                     b.Property<int>("Id")
@@ -163,6 +181,30 @@ namespace UnivateProperties_API.Migrations
163 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 208
             modelBuilder.Entity("UnivateProperties_API.Model.Logging.SearchLog", b =>
167 209
                 {
168 210
                     b.Property<int>("Id")
@@ -213,6 +255,28 @@ namespace UnivateProperties_API.Migrations
213 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 280
             modelBuilder.Entity("UnivateProperties_API.Model.ProcessFlow.BidItem", b =>
217 281
                 {
218 282
                     b.Property<int>("Id")
@@ -839,6 +903,9 @@ namespace UnivateProperties_API.Migrations
839 903
 
840 904
                     b.HasIndex("UserId");
841 905
 
906
+                    b.HasIndex("Telephone", "CellNumber", "Email")
907
+                        .IsUnique();
908
+
842 909
                     b.ToTable("Individuals");
843 910
                 });
844 911
 
@@ -901,6 +968,9 @@ namespace UnivateProperties_API.Migrations
901 968
 
902 969
                     b.HasKey("Id");
903 970
 
971
+                    b.HasIndex("Username")
972
+                        .IsUnique();
973
+
904 974
                     b.ToTable("Users");
905 975
                 });
906 976
 
@@ -924,6 +994,14 @@ namespace UnivateProperties_API.Migrations
924 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 1005
             modelBuilder.Entity("UnivateProperties_API.Model.Communication.SMTPAccount", b =>
928 1006
                 {
929 1007
                     b.HasOne("UnivateProperties_API.Model.Communication.SMTPHost", "SMTPHost")

Ładowanie…
Anuluj
Zapisz