[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 |
|
---|
[13f1472] | 33 | b.Property<string>("Alergens")
|
---|
| 34 | .IsRequired()
|
---|
| 35 | .HasColumnType("text");
|
---|
| 36 |
|
---|
[cc4db18] | 37 | b.Property<string>("Description")
|
---|
| 38 | .IsRequired()
|
---|
| 39 | .HasColumnType("text");
|
---|
| 40 |
|
---|
[13f1472] | 41 | b.Property<byte[]>("Image")
|
---|
| 42 | .IsRequired()
|
---|
| 43 | .HasColumnType("bytea");
|
---|
| 44 |
|
---|
| 45 | b.Property<bool>("IsVipOnly")
|
---|
| 46 | .HasColumnType("boolean");
|
---|
| 47 |
|
---|
[cc4db18] | 48 | b.Property<int>("Price")
|
---|
| 49 | .HasColumnType("integer");
|
---|
| 50 |
|
---|
| 51 | b.Property<int>("RestaurantId")
|
---|
| 52 | .HasColumnType("integer");
|
---|
| 53 |
|
---|
| 54 | b.Property<string>("Title")
|
---|
| 55 | .IsRequired()
|
---|
| 56 | .HasColumnType("text");
|
---|
| 57 |
|
---|
| 58 | b.HasKey("Id");
|
---|
| 59 |
|
---|
| 60 | b.HasIndex("RestaurantId");
|
---|
| 61 |
|
---|
| 62 | b.ToTable("MenuItems");
|
---|
| 63 | });
|
---|
| 64 |
|
---|
[13f1472] | 65 | modelBuilder.Entity("backend.Entities.QueueItem", b =>
|
---|
| 66 | {
|
---|
| 67 | b.Property<int>("Id")
|
---|
| 68 | .ValueGeneratedOnAdd()
|
---|
| 69 | .HasColumnType("integer");
|
---|
| 70 |
|
---|
| 71 | NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
---|
| 72 |
|
---|
| 73 | b.Property<DateTime>("CreatedAt")
|
---|
| 74 | .HasColumnType("timestamp with time zone");
|
---|
| 75 |
|
---|
| 76 | b.Property<string>("Message")
|
---|
| 77 | .IsRequired()
|
---|
| 78 | .HasColumnType("text");
|
---|
| 79 |
|
---|
| 80 | b.Property<string>("Reciptient")
|
---|
| 81 | .IsRequired()
|
---|
| 82 | .HasColumnType("text");
|
---|
| 83 |
|
---|
| 84 | b.Property<int>("Retries")
|
---|
| 85 | .HasColumnType("integer");
|
---|
| 86 |
|
---|
| 87 | b.Property<string>("Subject")
|
---|
| 88 | .IsRequired()
|
---|
| 89 | .HasColumnType("text");
|
---|
| 90 |
|
---|
| 91 | b.HasKey("Id");
|
---|
| 92 |
|
---|
| 93 | b.ToTable("QueueItems");
|
---|
| 94 | });
|
---|
| 95 |
|
---|
[b66b3ac] | 96 | modelBuilder.Entity("backend.Entities.Reservation", b =>
|
---|
| 97 | {
|
---|
| 98 | b.Property<int>("Id")
|
---|
| 99 | .ValueGeneratedOnAdd()
|
---|
| 100 | .HasColumnType("integer");
|
---|
| 101 |
|
---|
| 102 | NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
---|
| 103 |
|
---|
| 104 | b.Property<string>("ContactName")
|
---|
| 105 | .IsRequired()
|
---|
| 106 | .HasColumnType("text");
|
---|
| 107 |
|
---|
| 108 | b.Property<string>("ContactNumber")
|
---|
| 109 | .IsRequired()
|
---|
| 110 | .HasColumnType("text");
|
---|
| 111 |
|
---|
[057037b] | 112 | b.Property<int>("Persons")
|
---|
| 113 | .HasColumnType("integer");
|
---|
| 114 |
|
---|
[b66b3ac] | 115 | b.Property<int>("ReservationPlace")
|
---|
| 116 | .HasColumnType("integer");
|
---|
| 117 |
|
---|
| 118 | b.Property<int>("ReservationStatus")
|
---|
| 119 | .HasColumnType("integer");
|
---|
| 120 |
|
---|
| 121 | b.Property<int>("ReservationType")
|
---|
| 122 | .HasColumnType("integer");
|
---|
| 123 |
|
---|
| 124 | b.Property<int>("RestaurantId")
|
---|
| 125 | .HasColumnType("integer");
|
---|
| 126 |
|
---|
| 127 | b.Property<DateTime>("StartDate")
|
---|
| 128 | .HasColumnType("timestamp with time zone");
|
---|
| 129 |
|
---|
[cc4db18] | 130 | b.Property<int>("Table")
|
---|
| 131 | .HasColumnType("integer");
|
---|
| 132 |
|
---|
[b66b3ac] | 133 | b.HasKey("Id");
|
---|
| 134 |
|
---|
| 135 | b.HasIndex("RestaurantId");
|
---|
| 136 |
|
---|
| 137 | b.ToTable("Reservations");
|
---|
| 138 | });
|
---|
| 139 |
|
---|
| 140 | modelBuilder.Entity("backend.Entities.Restaurant", b =>
|
---|
| 141 | {
|
---|
| 142 | b.Property<int>("Id")
|
---|
| 143 | .ValueGeneratedOnAdd()
|
---|
| 144 | .HasColumnType("integer");
|
---|
| 145 |
|
---|
| 146 | NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
---|
| 147 |
|
---|
[cc4db18] | 148 | b.Property<string>("Address")
|
---|
| 149 | .IsRequired()
|
---|
| 150 | .HasColumnType("text");
|
---|
| 151 |
|
---|
| 152 | b.Property<byte[]>("Image")
|
---|
| 153 | .IsRequired()
|
---|
| 154 | .HasColumnType("bytea");
|
---|
| 155 |
|
---|
[b66b3ac] | 156 | b.Property<string>("Name")
|
---|
| 157 | .IsRequired()
|
---|
| 158 | .HasColumnType("text");
|
---|
| 159 |
|
---|
| 160 | b.Property<int?>("OwnerFk")
|
---|
| 161 | .HasColumnType("integer");
|
---|
| 162 |
|
---|
[cc4db18] | 163 | b.Property<string>("Phone")
|
---|
| 164 | .IsRequired()
|
---|
| 165 | .HasColumnType("text");
|
---|
| 166 |
|
---|
[b66b3ac] | 167 | b.HasKey("Id");
|
---|
| 168 |
|
---|
| 169 | b.HasIndex("OwnerFk")
|
---|
| 170 | .IsUnique();
|
---|
| 171 |
|
---|
| 172 | b.ToTable("Restoraunts");
|
---|
| 173 | });
|
---|
| 174 |
|
---|
[899b19d] | 175 | modelBuilder.Entity("backend.Entities.Review", b =>
|
---|
| 176 | {
|
---|
| 177 | b.Property<int>("Id")
|
---|
| 178 | .ValueGeneratedOnAdd()
|
---|
| 179 | .HasColumnType("integer");
|
---|
| 180 |
|
---|
| 181 | NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
---|
| 182 |
|
---|
| 183 | b.Property<DateTime>("CreatedAt")
|
---|
| 184 | .HasColumnType("timestamp with time zone");
|
---|
| 185 |
|
---|
| 186 | b.Property<string>("Description")
|
---|
| 187 | .IsRequired()
|
---|
| 188 | .HasColumnType("text");
|
---|
| 189 |
|
---|
| 190 | b.Property<int>("RestaurantId")
|
---|
| 191 | .HasColumnType("integer");
|
---|
| 192 |
|
---|
| 193 | b.Property<int>("Stars")
|
---|
| 194 | .HasColumnType("integer");
|
---|
| 195 |
|
---|
| 196 | b.Property<string>("Title")
|
---|
| 197 | .IsRequired()
|
---|
| 198 | .HasColumnType("text");
|
---|
| 199 |
|
---|
| 200 | b.Property<int>("UserId")
|
---|
| 201 | .HasColumnType("integer");
|
---|
| 202 |
|
---|
| 203 | b.HasKey("Id");
|
---|
| 204 |
|
---|
| 205 | b.HasIndex("RestaurantId");
|
---|
| 206 |
|
---|
| 207 | b.HasIndex("UserId");
|
---|
| 208 |
|
---|
| 209 | b.ToTable("Reviews");
|
---|
| 210 | });
|
---|
| 211 |
|
---|
[a569b7c] | 212 | modelBuilder.Entity("backend.Entities.ToDoItem", b =>
|
---|
| 213 | {
|
---|
| 214 | b.Property<int>("Id")
|
---|
| 215 | .ValueGeneratedOnAdd()
|
---|
| 216 | .HasColumnType("integer");
|
---|
| 217 |
|
---|
| 218 | NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
---|
| 219 |
|
---|
| 220 | b.Property<DateTime>("CreatedAt")
|
---|
| 221 | .HasColumnType("timestamp with time zone");
|
---|
| 222 |
|
---|
| 223 | b.Property<string>("Description")
|
---|
| 224 | .IsRequired()
|
---|
| 225 | .HasColumnType("text");
|
---|
| 226 |
|
---|
| 227 | b.Property<int?>("LinkedReviewId")
|
---|
| 228 | .HasColumnType("integer");
|
---|
| 229 |
|
---|
| 230 | b.Property<int>("Priority")
|
---|
| 231 | .HasColumnType("integer");
|
---|
| 232 |
|
---|
| 233 | b.Property<int>("Status")
|
---|
| 234 | .HasColumnType("integer");
|
---|
| 235 |
|
---|
| 236 | b.Property<string>("Title")
|
---|
| 237 | .IsRequired()
|
---|
| 238 | .HasColumnType("text");
|
---|
| 239 |
|
---|
| 240 | b.HasKey("Id");
|
---|
| 241 |
|
---|
| 242 | b.HasIndex("LinkedReviewId");
|
---|
| 243 |
|
---|
| 244 | b.ToTable("ToDoItems");
|
---|
| 245 | });
|
---|
| 246 |
|
---|
[b66b3ac] | 247 | modelBuilder.Entity("backend.Entities.User", b =>
|
---|
| 248 | {
|
---|
| 249 | b.Property<int>("Id")
|
---|
| 250 | .ValueGeneratedOnAdd()
|
---|
| 251 | .HasColumnType("integer");
|
---|
| 252 |
|
---|
| 253 | NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
---|
| 254 |
|
---|
[a26f6a1] | 255 | b.Property<string>("ConfirmationURL")
|
---|
| 256 | .HasColumnType("text");
|
---|
| 257 |
|
---|
| 258 | b.Property<DateTime?>("ConfirmationValidTo")
|
---|
| 259 | .HasColumnType("timestamp with time zone");
|
---|
| 260 |
|
---|
[057037b] | 261 | b.Property<string>("Email")
|
---|
[b66b3ac] | 262 | .IsRequired()
|
---|
| 263 | .HasColumnType("text");
|
---|
| 264 |
|
---|
[899b19d] | 265 | b.Property<bool>("IsAdmin")
|
---|
| 266 | .HasColumnType("boolean");
|
---|
| 267 |
|
---|
[a26f6a1] | 268 | b.Property<bool>("IsConfirmed")
|
---|
| 269 | .HasColumnType("boolean");
|
---|
| 270 |
|
---|
[13f1472] | 271 | b.Property<bool>("IsVip")
|
---|
| 272 | .HasColumnType("boolean");
|
---|
| 273 |
|
---|
[057037b] | 274 | b.Property<string>("Password")
|
---|
[b66b3ac] | 275 | .IsRequired()
|
---|
| 276 | .HasColumnType("text");
|
---|
| 277 |
|
---|
[a26f6a1] | 278 | b.Property<string>("PasswordResetURL")
|
---|
| 279 | .HasColumnType("text");
|
---|
| 280 |
|
---|
| 281 | b.Property<DateTime?>("PasswordResetValidTo")
|
---|
| 282 | .HasColumnType("timestamp with time zone");
|
---|
| 283 |
|
---|
[b66b3ac] | 284 | b.HasKey("Id");
|
---|
| 285 |
|
---|
| 286 | b.ToTable("Users");
|
---|
| 287 | });
|
---|
| 288 |
|
---|
[cc4db18] | 289 | modelBuilder.Entity("backend.Entities.MenuItem", b =>
|
---|
| 290 | {
|
---|
| 291 | b.HasOne("backend.Entities.Restaurant", "Restaurant")
|
---|
| 292 | .WithMany("Menu")
|
---|
| 293 | .HasForeignKey("RestaurantId")
|
---|
| 294 | .OnDelete(DeleteBehavior.Cascade)
|
---|
| 295 | .IsRequired();
|
---|
| 296 |
|
---|
| 297 | b.Navigation("Restaurant");
|
---|
| 298 | });
|
---|
| 299 |
|
---|
[b66b3ac] | 300 | modelBuilder.Entity("backend.Entities.Reservation", b =>
|
---|
| 301 | {
|
---|
| 302 | b.HasOne("backend.Entities.Restaurant", "Restaurant")
|
---|
| 303 | .WithMany("Reservations")
|
---|
| 304 | .HasForeignKey("RestaurantId")
|
---|
| 305 | .OnDelete(DeleteBehavior.Cascade)
|
---|
| 306 | .IsRequired();
|
---|
| 307 |
|
---|
| 308 | b.Navigation("Restaurant");
|
---|
| 309 | });
|
---|
| 310 |
|
---|
| 311 | modelBuilder.Entity("backend.Entities.Restaurant", b =>
|
---|
| 312 | {
|
---|
| 313 | b.HasOne("backend.Entities.User", "Owner")
|
---|
| 314 | .WithOne("Restaurant")
|
---|
| 315 | .HasForeignKey("backend.Entities.Restaurant", "OwnerFk");
|
---|
| 316 |
|
---|
| 317 | b.Navigation("Owner");
|
---|
| 318 | });
|
---|
| 319 |
|
---|
[899b19d] | 320 | modelBuilder.Entity("backend.Entities.Review", b =>
|
---|
| 321 | {
|
---|
| 322 | b.HasOne("backend.Entities.Restaurant", "Restaurant")
|
---|
| 323 | .WithMany("Reviews")
|
---|
| 324 | .HasForeignKey("RestaurantId")
|
---|
| 325 | .OnDelete(DeleteBehavior.Cascade)
|
---|
| 326 | .IsRequired();
|
---|
| 327 |
|
---|
| 328 | b.HasOne("backend.Entities.User", "User")
|
---|
| 329 | .WithMany()
|
---|
| 330 | .HasForeignKey("UserId")
|
---|
| 331 | .OnDelete(DeleteBehavior.Cascade)
|
---|
| 332 | .IsRequired();
|
---|
| 333 |
|
---|
| 334 | b.Navigation("Restaurant");
|
---|
| 335 |
|
---|
| 336 | b.Navigation("User");
|
---|
| 337 | });
|
---|
| 338 |
|
---|
[a569b7c] | 339 | modelBuilder.Entity("backend.Entities.ToDoItem", b =>
|
---|
| 340 | {
|
---|
| 341 | b.HasOne("backend.Entities.Review", "LinkedReview")
|
---|
| 342 | .WithMany()
|
---|
| 343 | .HasForeignKey("LinkedReviewId");
|
---|
| 344 |
|
---|
| 345 | b.Navigation("LinkedReview");
|
---|
| 346 | });
|
---|
| 347 |
|
---|
[b66b3ac] | 348 | modelBuilder.Entity("backend.Entities.Restaurant", b =>
|
---|
| 349 | {
|
---|
[cc4db18] | 350 | b.Navigation("Menu");
|
---|
| 351 |
|
---|
[b66b3ac] | 352 | b.Navigation("Reservations");
|
---|
[899b19d] | 353 |
|
---|
| 354 | b.Navigation("Reviews");
|
---|
[b66b3ac] | 355 | });
|
---|
| 356 |
|
---|
| 357 | modelBuilder.Entity("backend.Entities.User", b =>
|
---|
| 358 | {
|
---|
| 359 | b.Navigation("Restaurant")
|
---|
| 360 | .IsRequired();
|
---|
| 361 | });
|
---|
| 362 | #pragma warning restore 612, 618
|
---|
| 363 | }
|
---|
| 364 | }
|
---|
| 365 | }
|
---|