[b66b3ac] | 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 backend.Data;
|
---|
| 8 |
|
---|
| 9 | #nullable disable
|
---|
| 10 |
|
---|
| 11 | namespace backend.Migrations
|
---|
| 12 | {
|
---|
| 13 | [DbContext(typeof(DataContext))]
|
---|
| 14 | partial class DataContextModelSnapshot : ModelSnapshot
|
---|
| 15 | {
|
---|
| 16 | protected override void BuildModel(ModelBuilder modelBuilder)
|
---|
| 17 | {
|
---|
| 18 | #pragma warning disable 612, 618
|
---|
| 19 | modelBuilder
|
---|
| 20 | .HasAnnotation("ProductVersion", "6.0.3")
|
---|
| 21 | .HasAnnotation("Relational:MaxIdentifierLength", 63);
|
---|
| 22 |
|
---|
| 23 | NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
---|
| 24 |
|
---|
[cc4db18] | 25 | modelBuilder.Entity("backend.Entities.MenuItem", b =>
|
---|
| 26 | {
|
---|
| 27 | b.Property<int>("Id")
|
---|
| 28 | .ValueGeneratedOnAdd()
|
---|
| 29 | .HasColumnType("integer");
|
---|
| 30 |
|
---|
| 31 | NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
---|
| 32 |
|
---|
| 33 | b.Property<string>("Description")
|
---|
| 34 | .IsRequired()
|
---|
| 35 | .HasColumnType("text");
|
---|
| 36 |
|
---|
| 37 | b.Property<int>("Price")
|
---|
| 38 | .HasColumnType("integer");
|
---|
| 39 |
|
---|
| 40 | b.Property<int>("RestaurantId")
|
---|
| 41 | .HasColumnType("integer");
|
---|
| 42 |
|
---|
| 43 | b.Property<string>("Title")
|
---|
| 44 | .IsRequired()
|
---|
| 45 | .HasColumnType("text");
|
---|
| 46 |
|
---|
| 47 | b.HasKey("Id");
|
---|
| 48 |
|
---|
| 49 | b.HasIndex("RestaurantId");
|
---|
| 50 |
|
---|
| 51 | b.ToTable("MenuItems");
|
---|
| 52 | });
|
---|
| 53 |
|
---|
[b66b3ac] | 54 | modelBuilder.Entity("backend.Entities.Reservation", b =>
|
---|
| 55 | {
|
---|
| 56 | b.Property<int>("Id")
|
---|
| 57 | .ValueGeneratedOnAdd()
|
---|
| 58 | .HasColumnType("integer");
|
---|
| 59 |
|
---|
| 60 | NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
---|
| 61 |
|
---|
| 62 | b.Property<string>("ContactName")
|
---|
| 63 | .IsRequired()
|
---|
| 64 | .HasColumnType("text");
|
---|
| 65 |
|
---|
| 66 | b.Property<string>("ContactNumber")
|
---|
| 67 | .IsRequired()
|
---|
| 68 | .HasColumnType("text");
|
---|
| 69 |
|
---|
[057037b] | 70 | b.Property<int>("Persons")
|
---|
| 71 | .HasColumnType("integer");
|
---|
| 72 |
|
---|
[b66b3ac] | 73 | b.Property<int>("ReservationPlace")
|
---|
| 74 | .HasColumnType("integer");
|
---|
| 75 |
|
---|
| 76 | b.Property<int>("ReservationStatus")
|
---|
| 77 | .HasColumnType("integer");
|
---|
| 78 |
|
---|
| 79 | b.Property<int>("ReservationType")
|
---|
| 80 | .HasColumnType("integer");
|
---|
| 81 |
|
---|
| 82 | b.Property<int>("RestaurantId")
|
---|
| 83 | .HasColumnType("integer");
|
---|
| 84 |
|
---|
| 85 | b.Property<DateTime>("StartDate")
|
---|
| 86 | .HasColumnType("timestamp with time zone");
|
---|
| 87 |
|
---|
[cc4db18] | 88 | b.Property<int>("Table")
|
---|
| 89 | .HasColumnType("integer");
|
---|
| 90 |
|
---|
[b66b3ac] | 91 | b.HasKey("Id");
|
---|
| 92 |
|
---|
| 93 | b.HasIndex("RestaurantId");
|
---|
| 94 |
|
---|
| 95 | b.ToTable("Reservations");
|
---|
| 96 | });
|
---|
| 97 |
|
---|
| 98 | modelBuilder.Entity("backend.Entities.Restaurant", b =>
|
---|
| 99 | {
|
---|
| 100 | b.Property<int>("Id")
|
---|
| 101 | .ValueGeneratedOnAdd()
|
---|
| 102 | .HasColumnType("integer");
|
---|
| 103 |
|
---|
| 104 | NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
---|
| 105 |
|
---|
[cc4db18] | 106 | b.Property<string>("Address")
|
---|
| 107 | .IsRequired()
|
---|
| 108 | .HasColumnType("text");
|
---|
| 109 |
|
---|
| 110 | b.Property<byte[]>("Image")
|
---|
| 111 | .IsRequired()
|
---|
| 112 | .HasColumnType("bytea");
|
---|
| 113 |
|
---|
[b66b3ac] | 114 | b.Property<string>("Name")
|
---|
| 115 | .IsRequired()
|
---|
| 116 | .HasColumnType("text");
|
---|
| 117 |
|
---|
| 118 | b.Property<int?>("OwnerFk")
|
---|
| 119 | .HasColumnType("integer");
|
---|
| 120 |
|
---|
[cc4db18] | 121 | b.Property<string>("Phone")
|
---|
| 122 | .IsRequired()
|
---|
| 123 | .HasColumnType("text");
|
---|
| 124 |
|
---|
[b66b3ac] | 125 | b.HasKey("Id");
|
---|
| 126 |
|
---|
| 127 | b.HasIndex("OwnerFk")
|
---|
| 128 | .IsUnique();
|
---|
| 129 |
|
---|
| 130 | b.ToTable("Restoraunts");
|
---|
| 131 | });
|
---|
| 132 |
|
---|
[899b19d] | 133 | modelBuilder.Entity("backend.Entities.Review", b =>
|
---|
| 134 | {
|
---|
| 135 | b.Property<int>("Id")
|
---|
| 136 | .ValueGeneratedOnAdd()
|
---|
| 137 | .HasColumnType("integer");
|
---|
| 138 |
|
---|
| 139 | NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
---|
| 140 |
|
---|
| 141 | b.Property<DateTime>("CreatedAt")
|
---|
| 142 | .HasColumnType("timestamp with time zone");
|
---|
| 143 |
|
---|
| 144 | b.Property<string>("Description")
|
---|
| 145 | .IsRequired()
|
---|
| 146 | .HasColumnType("text");
|
---|
| 147 |
|
---|
| 148 | b.Property<int>("RestaurantId")
|
---|
| 149 | .HasColumnType("integer");
|
---|
| 150 |
|
---|
| 151 | b.Property<int>("Stars")
|
---|
| 152 | .HasColumnType("integer");
|
---|
| 153 |
|
---|
| 154 | b.Property<string>("Title")
|
---|
| 155 | .IsRequired()
|
---|
| 156 | .HasColumnType("text");
|
---|
| 157 |
|
---|
| 158 | b.Property<int>("UserId")
|
---|
| 159 | .HasColumnType("integer");
|
---|
| 160 |
|
---|
| 161 | b.HasKey("Id");
|
---|
| 162 |
|
---|
| 163 | b.HasIndex("RestaurantId");
|
---|
| 164 |
|
---|
| 165 | b.HasIndex("UserId");
|
---|
| 166 |
|
---|
| 167 | b.ToTable("Reviews");
|
---|
| 168 | });
|
---|
| 169 |
|
---|
[b66b3ac] | 170 | modelBuilder.Entity("backend.Entities.User", b =>
|
---|
| 171 | {
|
---|
| 172 | b.Property<int>("Id")
|
---|
| 173 | .ValueGeneratedOnAdd()
|
---|
| 174 | .HasColumnType("integer");
|
---|
| 175 |
|
---|
| 176 | NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
---|
| 177 |
|
---|
[a26f6a1] | 178 | b.Property<string>("ConfirmationURL")
|
---|
| 179 | .HasColumnType("text");
|
---|
| 180 |
|
---|
| 181 | b.Property<DateTime?>("ConfirmationValidTo")
|
---|
| 182 | .HasColumnType("timestamp with time zone");
|
---|
| 183 |
|
---|
[057037b] | 184 | b.Property<string>("Email")
|
---|
[b66b3ac] | 185 | .IsRequired()
|
---|
| 186 | .HasColumnType("text");
|
---|
| 187 |
|
---|
[899b19d] | 188 | b.Property<bool>("IsAdmin")
|
---|
| 189 | .HasColumnType("boolean");
|
---|
| 190 |
|
---|
[a26f6a1] | 191 | b.Property<bool>("IsConfirmed")
|
---|
| 192 | .HasColumnType("boolean");
|
---|
| 193 |
|
---|
[057037b] | 194 | b.Property<string>("Password")
|
---|
[b66b3ac] | 195 | .IsRequired()
|
---|
| 196 | .HasColumnType("text");
|
---|
| 197 |
|
---|
[a26f6a1] | 198 | b.Property<string>("PasswordResetURL")
|
---|
| 199 | .HasColumnType("text");
|
---|
| 200 |
|
---|
| 201 | b.Property<DateTime?>("PasswordResetValidTo")
|
---|
| 202 | .HasColumnType("timestamp with time zone");
|
---|
| 203 |
|
---|
[b66b3ac] | 204 | b.HasKey("Id");
|
---|
| 205 |
|
---|
| 206 | b.ToTable("Users");
|
---|
| 207 | });
|
---|
| 208 |
|
---|
[cc4db18] | 209 | modelBuilder.Entity("backend.Entities.MenuItem", b =>
|
---|
| 210 | {
|
---|
| 211 | b.HasOne("backend.Entities.Restaurant", "Restaurant")
|
---|
| 212 | .WithMany("Menu")
|
---|
| 213 | .HasForeignKey("RestaurantId")
|
---|
| 214 | .OnDelete(DeleteBehavior.Cascade)
|
---|
| 215 | .IsRequired();
|
---|
| 216 |
|
---|
| 217 | b.Navigation("Restaurant");
|
---|
| 218 | });
|
---|
| 219 |
|
---|
[b66b3ac] | 220 | modelBuilder.Entity("backend.Entities.Reservation", b =>
|
---|
| 221 | {
|
---|
| 222 | b.HasOne("backend.Entities.Restaurant", "Restaurant")
|
---|
| 223 | .WithMany("Reservations")
|
---|
| 224 | .HasForeignKey("RestaurantId")
|
---|
| 225 | .OnDelete(DeleteBehavior.Cascade)
|
---|
| 226 | .IsRequired();
|
---|
| 227 |
|
---|
| 228 | b.Navigation("Restaurant");
|
---|
| 229 | });
|
---|
| 230 |
|
---|
| 231 | modelBuilder.Entity("backend.Entities.Restaurant", b =>
|
---|
| 232 | {
|
---|
| 233 | b.HasOne("backend.Entities.User", "Owner")
|
---|
| 234 | .WithOne("Restaurant")
|
---|
| 235 | .HasForeignKey("backend.Entities.Restaurant", "OwnerFk");
|
---|
| 236 |
|
---|
| 237 | b.Navigation("Owner");
|
---|
| 238 | });
|
---|
| 239 |
|
---|
[899b19d] | 240 | modelBuilder.Entity("backend.Entities.Review", b =>
|
---|
| 241 | {
|
---|
| 242 | b.HasOne("backend.Entities.Restaurant", "Restaurant")
|
---|
| 243 | .WithMany("Reviews")
|
---|
| 244 | .HasForeignKey("RestaurantId")
|
---|
| 245 | .OnDelete(DeleteBehavior.Cascade)
|
---|
| 246 | .IsRequired();
|
---|
| 247 |
|
---|
| 248 | b.HasOne("backend.Entities.User", "User")
|
---|
| 249 | .WithMany()
|
---|
| 250 | .HasForeignKey("UserId")
|
---|
| 251 | .OnDelete(DeleteBehavior.Cascade)
|
---|
| 252 | .IsRequired();
|
---|
| 253 |
|
---|
| 254 | b.Navigation("Restaurant");
|
---|
| 255 |
|
---|
| 256 | b.Navigation("User");
|
---|
| 257 | });
|
---|
| 258 |
|
---|
[b66b3ac] | 259 | modelBuilder.Entity("backend.Entities.Restaurant", b =>
|
---|
| 260 | {
|
---|
[cc4db18] | 261 | b.Navigation("Menu");
|
---|
| 262 |
|
---|
[b66b3ac] | 263 | b.Navigation("Reservations");
|
---|
[899b19d] | 264 |
|
---|
| 265 | b.Navigation("Reviews");
|
---|
[b66b3ac] | 266 | });
|
---|
| 267 |
|
---|
| 268 | modelBuilder.Entity("backend.Entities.User", b =>
|
---|
| 269 | {
|
---|
| 270 | b.Navigation("Restaurant")
|
---|
| 271 | .IsRequired();
|
---|
| 272 | });
|
---|
| 273 | #pragma warning restore 612, 618
|
---|
| 274 | }
|
---|
| 275 | }
|
---|
| 276 | }
|
---|