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