source: iknow-api/Migrations/20251022202014_InitialCreate.Designer.cs@ e49c3ed

Last change on this file since e49c3ed was e49c3ed, checked in by stefansaveski <stefansaveski19@…>, 11 months ago

Add JWT authentication and refactor namespaces

Introduced JWT-based authentication and authorization:

  • Configured JWT authentication in Program.cs with token validation.
  • Added [Authorize] attribute to a new getstring endpoint.

Refactored namespaces for consistency:

  • Updated namespaces from iknow_api.Core.* to iknow_api.*.

Enhanced middleware and dependency injection:

  • Registered IAuthService and IUserRepository.
  • Added app.UseAuthentication() and app.UseAuthorization().

Removed unused code and dependencies:

  • Deleted WeatherForecast class.
  • Cleaned up redundant imports.

Updated project dependencies to include JWT authentication library.

  • Property mode set to 100644
File size: 2.1 KB
Line 
1// <auto-generated />
2using System;
3using Microsoft.EntityFrameworkCore;
4using Microsoft.EntityFrameworkCore.Infrastructure;
5using Microsoft.EntityFrameworkCore.Migrations;
6using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
7using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
8using iknow_api.Data;
9
10#nullable disable
11
12namespace iknow_api.Migrations
13{
14 [DbContext(typeof(AppDbContext))]
15 [Migration("20251022202014_InitialCreate")]
16 partial class InitialCreate
17 {
18 /// <inheritdoc />
19 protected override void BuildTargetModel(ModelBuilder modelBuilder)
20 {
21#pragma warning disable 612, 618
22 modelBuilder
23 .HasAnnotation("ProductVersion", "9.0.10")
24 .HasAnnotation("Relational:MaxIdentifierLength", 63);
25
26 NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
27
28 modelBuilder.Entity("iknow_api.Core.Models.User", b =>
29 {
30 b.Property<int>("Id")
31 .ValueGeneratedOnAdd()
32 .HasColumnType("integer");
33
34 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
35
36 b.Property<DateTime>("Bday")
37 .HasColumnType("timestamp with time zone");
38
39 b.Property<DateTime>("CreatedAt")
40 .HasColumnType("timestamp with time zone");
41
42 b.Property<string>("Email")
43 .HasColumnType("text");
44
45 b.Property<string>("Index")
46 .HasColumnType("text");
47
48 b.Property<string>("Name")
49 .HasColumnType("text");
50
51 b.Property<string>("PasswordHash")
52 .HasColumnType("text");
53
54 b.Property<int>("Role")
55 .HasColumnType("integer");
56
57 b.Property<string>("Surname")
58 .HasColumnType("text");
59
60 b.HasKey("Id");
61
62 b.ToTable("User");
63 });
64#pragma warning restore 612, 618
65 }
66 }
67}
Note: See TracBrowser for help on using the repository browser.