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

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

Implement JWT Authentication and Update User Schema

Replaced repository interface with FinXaccesApi.Repositories in UsersControllers.cs. Updated database schema to use PasswordHash instead of Password. Added new migration files reflecting these changes. Updated service registration in Program.cs to include IAuthService and IUserRepository. Refactored UserRepository.cs and IUserRepository.cs with new methods and namespace changes. Commented out UserService.cs. Updated appsettings with new connection strings and JWT settings. Added BCrypt.Net-Next and System.IdentityModel.Tokens.Jwt packages. Introduced AuthController, UserDTO, AuthService, and IAuthService for handling authentication and user management.

  • 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.Core.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.