[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 |
|
---|
| 133 | modelBuilder.Entity("backend.Entities.User", b =>
|
---|
| 134 | {
|
---|
| 135 | b.Property<int>("Id")
|
---|
| 136 | .ValueGeneratedOnAdd()
|
---|
| 137 | .HasColumnType("integer");
|
---|
| 138 |
|
---|
| 139 | NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
---|
| 140 |
|
---|
[057037b] | 141 | b.Property<string>("Email")
|
---|
[b66b3ac] | 142 | .IsRequired()
|
---|
| 143 | .HasColumnType("text");
|
---|
| 144 |
|
---|
[057037b] | 145 | b.Property<string>("Password")
|
---|
[b66b3ac] | 146 | .IsRequired()
|
---|
| 147 | .HasColumnType("text");
|
---|
| 148 |
|
---|
| 149 | b.HasKey("Id");
|
---|
| 150 |
|
---|
| 151 | b.ToTable("Users");
|
---|
| 152 | });
|
---|
| 153 |
|
---|
[cc4db18] | 154 | modelBuilder.Entity("backend.Entities.MenuItem", b =>
|
---|
| 155 | {
|
---|
| 156 | b.HasOne("backend.Entities.Restaurant", "Restaurant")
|
---|
| 157 | .WithMany("Menu")
|
---|
| 158 | .HasForeignKey("RestaurantId")
|
---|
| 159 | .OnDelete(DeleteBehavior.Cascade)
|
---|
| 160 | .IsRequired();
|
---|
| 161 |
|
---|
| 162 | b.Navigation("Restaurant");
|
---|
| 163 | });
|
---|
| 164 |
|
---|
[b66b3ac] | 165 | modelBuilder.Entity("backend.Entities.Reservation", b =>
|
---|
| 166 | {
|
---|
| 167 | b.HasOne("backend.Entities.Restaurant", "Restaurant")
|
---|
| 168 | .WithMany("Reservations")
|
---|
| 169 | .HasForeignKey("RestaurantId")
|
---|
| 170 | .OnDelete(DeleteBehavior.Cascade)
|
---|
| 171 | .IsRequired();
|
---|
| 172 |
|
---|
| 173 | b.Navigation("Restaurant");
|
---|
| 174 | });
|
---|
| 175 |
|
---|
| 176 | modelBuilder.Entity("backend.Entities.Restaurant", b =>
|
---|
| 177 | {
|
---|
| 178 | b.HasOne("backend.Entities.User", "Owner")
|
---|
| 179 | .WithOne("Restaurant")
|
---|
| 180 | .HasForeignKey("backend.Entities.Restaurant", "OwnerFk");
|
---|
| 181 |
|
---|
| 182 | b.Navigation("Owner");
|
---|
| 183 | });
|
---|
| 184 |
|
---|
| 185 | modelBuilder.Entity("backend.Entities.Restaurant", b =>
|
---|
| 186 | {
|
---|
[cc4db18] | 187 | b.Navigation("Menu");
|
---|
| 188 |
|
---|
[b66b3ac] | 189 | b.Navigation("Reservations");
|
---|
| 190 | });
|
---|
| 191 |
|
---|
| 192 | modelBuilder.Entity("backend.Entities.User", b =>
|
---|
| 193 | {
|
---|
| 194 | b.Navigation("Restaurant")
|
---|
| 195 | .IsRequired();
|
---|
| 196 | });
|
---|
| 197 | #pragma warning restore 612, 618
|
---|
| 198 | }
|
---|
| 199 | }
|
---|
| 200 | }
|
---|