source: iknow-api/Migrations/AppDbContextModelSnapshot.cs@ 5b42c8d

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