My Project 1.0
Open Source Encrypted Vault Storage
Loading...
Searching...
No Matches
20250920041032_ApiSchema.Designer.cs
Go to the documentation of this file.
1// <auto-generated />
2using System;
3using Microsoft.EntityFrameworkCore;
4using Microsoft.EntityFrameworkCore.Infrastructure;
5using Microsoft.EntityFrameworkCore.Metadata;
6using Microsoft.EntityFrameworkCore.Migrations;
7using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
9
10#nullable disable
11
13{
14 [DbContext(typeof(AppDbContext))]
15 [Migration("20250920041032_ApiSchema")]
16 partial class ApiSchema
17 {
19 protected override void BuildTargetModel(ModelBuilder modelBuilder)
20 {
21#pragma warning disable 612, 618
22 modelBuilder
23 .HasAnnotation("ProductVersion", "9.0.9")
24 .HasAnnotation("Relational:MaxIdentifierLength", 128);
25
26 SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
27
28 modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
29 {
30 b.Property<string>("Id")
31 .HasColumnType("nvarchar(450)");
32
33 b.Property<string>("ConcurrencyStamp")
34 .IsConcurrencyToken()
35 .HasColumnType("nvarchar(max)");
36
37 b.Property<string>("Name")
38 .HasMaxLength(256)
39 .HasColumnType("nvarchar(256)");
40
41 b.Property<string>("NormalizedName")
42 .HasMaxLength(256)
43 .HasColumnType("nvarchar(256)");
44
45 b.HasKey("Id");
46
47 b.HasIndex("NormalizedName")
48 .IsUnique()
49 .HasDatabaseName("RoleNameIndex")
50 .HasFilter("[NormalizedName] IS NOT NULL");
51
52 b.ToTable("AspNetRoles", (string)null);
53 });
54
55 modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
56 {
57 b.Property<int>("Id")
58 .ValueGeneratedOnAdd()
59 .HasColumnType("int");
60
61 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
62
63 b.Property<string>("ClaimType")
64 .HasColumnType("nvarchar(max)");
65
66 b.Property<string>("ClaimValue")
67 .HasColumnType("nvarchar(max)");
68
69 b.Property<string>("RoleId")
70 .IsRequired()
71 .HasColumnType("nvarchar(450)");
72
73 b.HasKey("Id");
74
75 b.HasIndex("RoleId");
76
77 b.ToTable("AspNetRoleClaims", (string)null);
78 });
79
80 modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
81 {
82 b.Property<int>("Id")
83 .ValueGeneratedOnAdd()
84 .HasColumnType("int");
85
86 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
87
88 b.Property<string>("ClaimType")
89 .HasColumnType("nvarchar(max)");
90
91 b.Property<string>("ClaimValue")
92 .HasColumnType("nvarchar(max)");
93
94 b.Property<string>("UserId")
95 .IsRequired()
96 .HasColumnType("nvarchar(450)");
97
98 b.HasKey("Id");
99
100 b.HasIndex("UserId");
101
102 b.ToTable("AspNetUserClaims", (string)null);
103 });
104
105 modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
106 {
107 b.Property<string>("LoginProvider")
108 .HasColumnType("nvarchar(450)");
109
110 b.Property<string>("ProviderKey")
111 .HasColumnType("nvarchar(450)");
112
113 b.Property<string>("ProviderDisplayName")
114 .HasColumnType("nvarchar(max)");
115
116 b.Property<string>("UserId")
117 .IsRequired()
118 .HasColumnType("nvarchar(450)");
119
120 b.HasKey("LoginProvider", "ProviderKey");
121
122 b.HasIndex("UserId");
123
124 b.ToTable("AspNetUserLogins", (string)null);
125 });
126
127 modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
128 {
129 b.Property<string>("UserId")
130 .HasColumnType("nvarchar(450)");
131
132 b.Property<string>("RoleId")
133 .HasColumnType("nvarchar(450)");
134
135 b.HasKey("UserId", "RoleId");
136
137 b.HasIndex("RoleId");
138
139 b.ToTable("AspNetUserRoles", (string)null);
140 });
141
142 modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
143 {
144 b.Property<string>("UserId")
145 .HasColumnType("nvarchar(450)");
146
147 b.Property<string>("LoginProvider")
148 .HasColumnType("nvarchar(450)");
149
150 b.Property<string>("Name")
151 .HasColumnType("nvarchar(450)");
152
153 b.Property<string>("Value")
154 .HasColumnType("nvarchar(max)");
155
156 b.HasKey("UserId", "LoginProvider", "Name");
157
158 b.ToTable("AspNetUserTokens", (string)null);
159 });
160
161 modelBuilder.Entity("ignivault.WebAPI.Data.Entities.LoginUser", b =>
162 {
163 b.Property<string>("Id")
164 .HasColumnType("nvarchar(450)");
165
166 b.Property<int>("AccessFailedCount")
167 .HasColumnType("int");
168
169 b.Property<string>("ConcurrencyStamp")
170 .IsConcurrencyToken()
171 .HasColumnType("nvarchar(max)");
172
173 b.Property<string>("Email")
174 .HasMaxLength(256)
175 .HasColumnType("nvarchar(256)");
176
177 b.Property<bool>("EmailConfirmed")
178 .HasColumnType("bit");
179
180 b.Property<byte[]>("KeySalt")
181 .IsRequired()
182 .HasColumnType("varbinary(max)");
183
184 b.Property<bool>("LockoutEnabled")
185 .HasColumnType("bit");
186
187 b.Property<DateTimeOffset?>("LockoutEnd")
188 .HasColumnType("datetimeoffset");
189
190 b.Property<string>("NormalizedEmail")
191 .HasMaxLength(256)
192 .HasColumnType("nvarchar(256)");
193
194 b.Property<string>("NormalizedUserName")
195 .HasMaxLength(256)
196 .HasColumnType("nvarchar(256)");
197
198 b.Property<string>("PasswordHash")
199 .HasColumnType("nvarchar(max)");
200
201 b.Property<string>("PhoneNumber")
202 .HasColumnType("nvarchar(max)");
203
204 b.Property<bool>("PhoneNumberConfirmed")
205 .HasColumnType("bit");
206
207 b.Property<string>("SecurityStamp")
208 .HasColumnType("nvarchar(max)");
209
210 b.Property<bool>("TwoFactorEnabled")
211 .HasColumnType("bit");
212
213 b.Property<string>("UserName")
214 .HasMaxLength(256)
215 .HasColumnType("nvarchar(256)");
216
217 b.HasKey("Id");
218
219 b.HasIndex("NormalizedEmail")
220 .HasDatabaseName("EmailIndex");
221
222 b.HasIndex("NormalizedUserName")
223 .IsUnique()
224 .HasDatabaseName("UserNameIndex")
225 .HasFilter("[NormalizedUserName] IS NOT NULL");
226
227 b.ToTable("AspNetUsers", (string)null);
228 });
229
230 modelBuilder.Entity("ignivault.WebAPI.Data.Entities.StoredBlob", b =>
231 {
232 b.Property<Guid>("BlobId")
233 .ValueGeneratedOnAdd()
234 .HasColumnType("uniqueidentifier");
235
236 b.Property<byte[]>("Data")
237 .IsRequired()
238 .HasColumnType("varbinary(max)");
239
240 b.Property<int>("VaultItemId")
241 .HasColumnType("int");
242
243 b.HasKey("BlobId");
244
245 b.HasIndex("VaultItemId")
246 .IsUnique();
247
248 b.ToTable("StoredBlobs");
249 });
250
251 modelBuilder.Entity("ignivault.WebAPI.Data.Entities.UserActivity", b =>
252 {
253 b.Property<long>("Id")
254 .ValueGeneratedOnAdd()
255 .HasColumnType("bigint");
256
257 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
258
259 b.Property<int>("ActivityType")
260 .HasColumnType("int");
261
262 b.Property<string>("Details")
263 .HasMaxLength(255)
264 .HasColumnType("nvarchar(255)");
265
266 b.Property<string>("IpAddress")
267 .IsRequired()
268 .HasMaxLength(45)
269 .HasColumnType("nvarchar(45)");
270
271 b.Property<bool>("Success")
272 .HasColumnType("bit");
273
274 b.Property<DateTime>("Timestamp")
275 .HasColumnType("datetime2");
276
277 b.Property<string>("UserAgent")
278 .HasColumnType("nvarchar(max)");
279
280 b.Property<string>("UserId")
281 .IsRequired()
282 .HasColumnType("nvarchar(450)");
283
284 b.HasKey("Id");
285
286 b.HasIndex("Timestamp");
287
288 b.HasIndex("UserId");
289
290 b.ToTable("UserActivities");
291 });
292
293 modelBuilder.Entity("ignivault.WebAPI.Data.Entities.VaultEntity", b =>
294 {
295 b.Property<int>("ItemId")
296 .ValueGeneratedOnAdd()
297 .HasColumnType("int");
298
299 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ItemId"));
300
301 b.Property<Guid?>("BlobId")
302 .HasColumnType("uniqueidentifier");
303
304 b.Property<DateTime>("CreatedAt")
305 .HasColumnType("datetime2");
306
307 b.Property<byte[]>("EncryptedData")
308 .IsRequired()
309 .HasColumnType("varbinary(max)");
310
311 b.Property<bool>("IsBlobStored")
312 .HasColumnType("bit");
313
314 b.Property<int>("ItemType")
315 .HasColumnType("int");
316
317 b.Property<byte[]>("Iv")
318 .IsRequired()
319 .HasColumnType("varbinary(max)");
320
321 b.Property<string>("Name")
322 .IsRequired()
323 .HasColumnType("nvarchar(max)");
324
325 b.Property<DateTime>("UpdatedAt")
326 .HasColumnType("datetime2");
327
328 b.Property<string>("UserId")
329 .IsRequired()
330 .HasColumnType("nvarchar(450)");
331
332 b.HasKey("ItemId");
333
334 b.HasIndex("UserId");
335
336 b.ToTable("VaultItems");
337 });
338
339 modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
340 {
341 b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
342 .WithMany()
343 .HasForeignKey("RoleId")
344 .OnDelete(DeleteBehavior.Cascade)
345 .IsRequired();
346 });
347
348 modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
349 {
350 b.HasOne("ignivault.WebAPI.Data.Entities.LoginUser", null)
351 .WithMany()
352 .HasForeignKey("UserId")
353 .OnDelete(DeleteBehavior.Cascade)
354 .IsRequired();
355 });
356
357 modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
358 {
359 b.HasOne("ignivault.WebAPI.Data.Entities.LoginUser", null)
360 .WithMany()
361 .HasForeignKey("UserId")
362 .OnDelete(DeleteBehavior.Cascade)
363 .IsRequired();
364 });
365
366 modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
367 {
368 b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
369 .WithMany()
370 .HasForeignKey("RoleId")
371 .OnDelete(DeleteBehavior.Cascade)
372 .IsRequired();
373
374 b.HasOne("ignivault.WebAPI.Data.Entities.LoginUser", null)
375 .WithMany()
376 .HasForeignKey("UserId")
377 .OnDelete(DeleteBehavior.Cascade)
378 .IsRequired();
379 });
380
381 modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
382 {
383 b.HasOne("ignivault.WebAPI.Data.Entities.LoginUser", null)
384 .WithMany()
385 .HasForeignKey("UserId")
386 .OnDelete(DeleteBehavior.Cascade)
387 .IsRequired();
388 });
389
390 modelBuilder.Entity("ignivault.WebAPI.Data.Entities.StoredBlob", b =>
391 {
392 b.HasOne("ignivault.WebAPI.Data.Entities.VaultEntity", "VaultItem")
393 .WithOne("StoredBlob")
394 .HasForeignKey("ignivault.WebAPI.Data.Entities.StoredBlob", "VaultItemId")
395 .OnDelete(DeleteBehavior.Cascade)
396 .IsRequired();
397
398 b.Navigation("VaultItem");
399 });
400
401 modelBuilder.Entity("ignivault.WebAPI.Data.Entities.UserActivity", b =>
402 {
403 b.HasOne("ignivault.WebAPI.Data.Entities.LoginUser", "User")
404 .WithMany()
405 .HasForeignKey("UserId")
406 .OnDelete(DeleteBehavior.Cascade)
407 .IsRequired();
408
409 b.Navigation("User");
410 });
411
412 modelBuilder.Entity("ignivault.WebAPI.Data.Entities.VaultEntity", b =>
413 {
414 b.HasOne("ignivault.WebAPI.Data.Entities.LoginUser", "User")
415 .WithMany()
416 .HasForeignKey("UserId")
417 .OnDelete(DeleteBehavior.Cascade)
418 .IsRequired();
419
420 b.Navigation("User");
421 });
422
423 modelBuilder.Entity("ignivault.WebAPI.Data.Entities.VaultEntity", b =>
424 {
425 b.Navigation("StoredBlob")
426 .IsRequired();
427 });
428#pragma warning restore 612, 618
429 }
430 }
431}
override void BuildTargetModel(ModelBuilder modelBuilder)