[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 |
|
---|
| 25 | modelBuilder.Entity("backend.Entities.Reservation", 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>("ContactName")
|
---|
| 34 | .IsRequired()
|
---|
| 35 | .HasColumnType("text");
|
---|
| 36 |
|
---|
| 37 | b.Property<string>("ContactNumber")
|
---|
| 38 | .IsRequired()
|
---|
| 39 | .HasColumnType("text");
|
---|
| 40 |
|
---|
[057037b] | 41 | b.Property<int>("Persons")
|
---|
| 42 | .HasColumnType("integer");
|
---|
| 43 |
|
---|
[b66b3ac] | 44 | b.Property<int>("ReservationPlace")
|
---|
| 45 | .HasColumnType("integer");
|
---|
| 46 |
|
---|
| 47 | b.Property<int>("ReservationStatus")
|
---|
| 48 | .HasColumnType("integer");
|
---|
| 49 |
|
---|
| 50 | b.Property<int>("ReservationType")
|
---|
| 51 | .HasColumnType("integer");
|
---|
| 52 |
|
---|
| 53 | b.Property<int>("RestaurantId")
|
---|
| 54 | .HasColumnType("integer");
|
---|
| 55 |
|
---|
| 56 | b.Property<DateTime>("StartDate")
|
---|
| 57 | .HasColumnType("timestamp with time zone");
|
---|
| 58 |
|
---|
| 59 | b.HasKey("Id");
|
---|
| 60 |
|
---|
| 61 | b.HasIndex("RestaurantId");
|
---|
| 62 |
|
---|
| 63 | b.ToTable("Reservations");
|
---|
| 64 | });
|
---|
| 65 |
|
---|
| 66 | modelBuilder.Entity("backend.Entities.Restaurant", b =>
|
---|
| 67 | {
|
---|
| 68 | b.Property<int>("Id")
|
---|
| 69 | .ValueGeneratedOnAdd()
|
---|
| 70 | .HasColumnType("integer");
|
---|
| 71 |
|
---|
| 72 | NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
---|
| 73 |
|
---|
| 74 | b.Property<string>("Name")
|
---|
| 75 | .IsRequired()
|
---|
| 76 | .HasColumnType("text");
|
---|
| 77 |
|
---|
| 78 | b.Property<int?>("OwnerFk")
|
---|
| 79 | .HasColumnType("integer");
|
---|
| 80 |
|
---|
| 81 | b.HasKey("Id");
|
---|
| 82 |
|
---|
| 83 | b.HasIndex("OwnerFk")
|
---|
| 84 | .IsUnique();
|
---|
| 85 |
|
---|
| 86 | b.ToTable("Restoraunts");
|
---|
| 87 | });
|
---|
| 88 |
|
---|
| 89 | modelBuilder.Entity("backend.Entities.User", b =>
|
---|
| 90 | {
|
---|
| 91 | b.Property<int>("Id")
|
---|
| 92 | .ValueGeneratedOnAdd()
|
---|
| 93 | .HasColumnType("integer");
|
---|
| 94 |
|
---|
| 95 | NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
---|
| 96 |
|
---|
[057037b] | 97 | b.Property<string>("Email")
|
---|
[b66b3ac] | 98 | .IsRequired()
|
---|
| 99 | .HasColumnType("text");
|
---|
| 100 |
|
---|
[057037b] | 101 | b.Property<string>("Password")
|
---|
[b66b3ac] | 102 | .IsRequired()
|
---|
| 103 | .HasColumnType("text");
|
---|
| 104 |
|
---|
| 105 | b.HasKey("Id");
|
---|
| 106 |
|
---|
| 107 | b.ToTable("Users");
|
---|
| 108 | });
|
---|
| 109 |
|
---|
| 110 | modelBuilder.Entity("backend.Entities.Reservation", b =>
|
---|
| 111 | {
|
---|
| 112 | b.HasOne("backend.Entities.Restaurant", "Restaurant")
|
---|
| 113 | .WithMany("Reservations")
|
---|
| 114 | .HasForeignKey("RestaurantId")
|
---|
| 115 | .OnDelete(DeleteBehavior.Cascade)
|
---|
| 116 | .IsRequired();
|
---|
| 117 |
|
---|
| 118 | b.Navigation("Restaurant");
|
---|
| 119 | });
|
---|
| 120 |
|
---|
| 121 | modelBuilder.Entity("backend.Entities.Restaurant", b =>
|
---|
| 122 | {
|
---|
| 123 | b.HasOne("backend.Entities.User", "Owner")
|
---|
| 124 | .WithOne("Restaurant")
|
---|
| 125 | .HasForeignKey("backend.Entities.Restaurant", "OwnerFk");
|
---|
| 126 |
|
---|
| 127 | b.Navigation("Owner");
|
---|
| 128 | });
|
---|
| 129 |
|
---|
| 130 | modelBuilder.Entity("backend.Entities.Restaurant", b =>
|
---|
| 131 | {
|
---|
| 132 | b.Navigation("Reservations");
|
---|
| 133 | });
|
---|
| 134 |
|
---|
| 135 | modelBuilder.Entity("backend.Entities.User", b =>
|
---|
| 136 | {
|
---|
| 137 | b.Navigation("Restaurant")
|
---|
| 138 | .IsRequired();
|
---|
| 139 | });
|
---|
| 140 | #pragma warning restore 612, 618
|
---|
| 141 | }
|
---|
| 142 | }
|
---|
| 143 | }
|
---|