source: iknow-api/Migrations/20251030124902_new.Designer.cs@ a92a2a4

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

Refactored enums

  • Property mode set to 100644
File size: 7.7 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("20251030124902_new")]
16 partial class @new
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.Models.ContactInfo", b =>
29 {
30 b.Property<int>("Id")
31 .ValueGeneratedOnAdd()
32 .HasColumnType("integer");
33
34 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
35
36 b.Property<int>("UserId")
37 .HasColumnType("integer");
38
39 b.Property<string>("address")
40 .HasColumnType("text");
41
42 b.Property<string>("city")
43 .HasColumnType("text");
44
45 b.Property<string>("microsoftEmail")
46 .HasColumnType("text");
47
48 b.Property<string>("municipality")
49 .HasColumnType("text");
50
51 b.Property<string>("phoneNumber")
52 .HasColumnType("text");
53
54 b.HasKey("Id");
55
56 b.HasIndex("UserId")
57 .IsUnique();
58
59 b.ToTable("ContactInfo");
60 });
61
62 modelBuilder.Entity("iknow_api.Models.EnrollmentInfo", b =>
63 {
64 b.Property<int>("Id")
65 .ValueGeneratedOnAdd()
66 .HasColumnType("integer");
67
68 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
69
70 b.Property<int>("UserId")
71 .HasColumnType("integer");
72
73 b.Property<int>("enrollmentYear")
74 .HasColumnType("integer");
75
76 b.Property<int>("major")
77 .HasColumnType("integer");
78
79 b.HasKey("Id");
80
81 b.HasIndex("UserId")
82 .IsUnique();
83
84 b.ToTable("EnrollmentInfo");
85 });
86
87 modelBuilder.Entity("iknow_api.Models.HighSchool", b =>
88 {
89 b.Property<int>("Id")
90 .ValueGeneratedOnAdd()
91 .HasColumnType("integer");
92
93 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
94
95 b.Property<float>("GPA")
96 .HasColumnType("real");
97
98 b.Property<int>("UserId")
99 .HasColumnType("integer");
100
101 b.Property<int>("tip")
102 .HasColumnType("integer");
103
104 b.HasKey("Id");
105
106 b.HasIndex("UserId")
107 .IsUnique();
108
109 b.ToTable("HighSchool");
110 });
111
112 modelBuilder.Entity("iknow_api.Models.RefreshToken", b =>
113 {
114 b.Property<int>("Id")
115 .ValueGeneratedOnAdd()
116 .HasColumnType("integer");
117
118 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
119
120 b.Property<DateTime>("ExpiresAt")
121 .HasColumnType("timestamp with time zone");
122
123 b.Property<bool>("IsValid")
124 .HasColumnType("boolean");
125
126 b.Property<string>("Token")
127 .HasColumnType("text");
128
129 b.Property<int>("UserId")
130 .HasColumnType("integer");
131
132 b.HasKey("Id");
133
134 b.HasIndex("UserId");
135
136 b.ToTable("RefreshToken");
137 });
138
139 modelBuilder.Entity("iknow_api.Models.User", b =>
140 {
141 b.Property<int>("Id")
142 .ValueGeneratedOnAdd()
143 .HasColumnType("integer");
144
145 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
146
147 b.Property<DateTime>("Bday")
148 .HasColumnType("timestamp with time zone");
149
150 b.Property<DateTime>("CreatedAt")
151 .HasColumnType("timestamp with time zone");
152
153 b.Property<string>("EMBG")
154 .HasColumnType("text");
155
156 b.Property<string>("Email")
157 .HasColumnType("text");
158
159 b.Property<string>("Index")
160 .HasColumnType("text");
161
162 b.Property<string>("Name")
163 .HasColumnType("text");
164
165 b.Property<string>("PasswordHash")
166 .HasColumnType("text");
167
168 b.Property<int>("Role")
169 .HasColumnType("integer");
170
171 b.Property<string>("Surname")
172 .HasColumnType("text");
173
174 b.HasKey("Id");
175
176 b.ToTable("User");
177 });
178
179 modelBuilder.Entity("iknow_api.Models.ContactInfo", b =>
180 {
181 b.HasOne("iknow_api.Models.User", "User")
182 .WithOne("ContactInfo")
183 .HasForeignKey("iknow_api.Models.ContactInfo", "UserId")
184 .OnDelete(DeleteBehavior.Cascade)
185 .IsRequired();
186
187 b.Navigation("User");
188 });
189
190 modelBuilder.Entity("iknow_api.Models.EnrollmentInfo", b =>
191 {
192 b.HasOne("iknow_api.Models.User", "User")
193 .WithOne("EnrollmentInfo")
194 .HasForeignKey("iknow_api.Models.EnrollmentInfo", "UserId")
195 .OnDelete(DeleteBehavior.Cascade)
196 .IsRequired();
197
198 b.Navigation("User");
199 });
200
201 modelBuilder.Entity("iknow_api.Models.HighSchool", b =>
202 {
203 b.HasOne("iknow_api.Models.User", "User")
204 .WithOne("HighSchool")
205 .HasForeignKey("iknow_api.Models.HighSchool", "UserId")
206 .OnDelete(DeleteBehavior.Cascade)
207 .IsRequired();
208
209 b.Navigation("User");
210 });
211
212 modelBuilder.Entity("iknow_api.Models.RefreshToken", b =>
213 {
214 b.HasOne("iknow_api.Models.User", "User")
215 .WithMany()
216 .HasForeignKey("UserId")
217 .OnDelete(DeleteBehavior.Cascade)
218 .IsRequired();
219
220 b.Navigation("User");
221 });
222
223 modelBuilder.Entity("iknow_api.Models.User", b =>
224 {
225 b.Navigation("ContactInfo");
226
227 b.Navigation("EnrollmentInfo");
228
229 b.Navigation("HighSchool");
230 });
231#pragma warning restore 612, 618
232 }
233 }
234}
Note: See TracBrowser for help on using the repository browser.