source: iknow-api/Migrations/AppDbContextModelSnapshot.cs@ c155364

Last change on this file since c155364 was 3347c1b, checked in by imbrsk <boris696boris@…>, 11 months ago

Implement refresh token functionality with associated services and repositories

  • Property mode set to 100644
File size: 3.3 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.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.Models.RefreshToken", 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>("ExpiresAt")
34 .HasColumnType("timestamp with time zone");
35
36 b.Property<bool>("IsValid")
37 .HasColumnType("boolean");
38
39 b.Property<string>("Token")
40 .IsRequired()
41 .HasColumnType("text");
42
43 b.Property<int>("UserId")
44 .HasColumnType("integer");
45
46 b.HasKey("Id");
47
48 b.HasIndex("UserId");
49
50 b.ToTable("RefreshToken");
51 });
52
53 modelBuilder.Entity("iknow_api.Models.User", b =>
54 {
55 b.Property<int>("Id")
56 .ValueGeneratedOnAdd()
57 .HasColumnType("integer");
58
59 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
60
61 b.Property<DateTime>("Bday")
62 .HasColumnType("timestamp with time zone");
63
64 b.Property<DateTime>("CreatedAt")
65 .HasColumnType("timestamp with time zone");
66
67 b.Property<string>("Email")
68 .HasColumnType("text");
69
70 b.Property<string>("Index")
71 .HasColumnType("text");
72
73 b.Property<string>("Name")
74 .HasColumnType("text");
75
76 b.Property<string>("PasswordHash")
77 .HasColumnType("text");
78
79 b.Property<int>("Role")
80 .HasColumnType("integer");
81
82 b.Property<string>("Surname")
83 .HasColumnType("text");
84
85 b.HasKey("Id");
86
87 b.ToTable("User");
88 });
89
90 modelBuilder.Entity("iknow_api.Models.RefreshToken", b =>
91 {
92 b.HasOne("iknow_api.Models.User", "User")
93 .WithMany()
94 .HasForeignKey("UserId")
95 .OnDelete(DeleteBehavior.Cascade)
96 .IsRequired();
97
98 b.Navigation("User");
99 });
100#pragma warning restore 612, 618
101 }
102 }
103}
Note: See TracBrowser for help on using the repository browser.