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