source: resTools_backend/backend/Migrations/20220705160351_Reservation-Tables.Designer.cs

Last change on this file was cc4db18, checked in by Danilo <danilo.najkov@…>, 2 years ago

reservation module changes + contact module + menu module

  • Property mode set to 100644
File size: 4.9 KB
Line 
1// <auto-generated />
2using System;
3using Microsoft.EntityFrameworkCore;
4using Microsoft.EntityFrameworkCore.Infrastructure;
5using Microsoft.EntityFrameworkCore.Migrations;
6using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
7using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
8using backend.Data;
9
10#nullable disable
11
12namespace backend.Migrations
13{
14 [DbContext(typeof(DataContext))]
15 [Migration("20220705160351_Reservation-Tables")]
16 partial class ReservationTables
17 {
18 protected override void BuildTargetModel(ModelBuilder modelBuilder)
19 {
20#pragma warning disable 612, 618
21 modelBuilder
22 .HasAnnotation("ProductVersion", "6.0.3")
23 .HasAnnotation("Relational:MaxIdentifierLength", 63);
24
25 NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
26
27 modelBuilder.Entity("backend.Entities.Reservation", b =>
28 {
29 b.Property<int>("Id")
30 .ValueGeneratedOnAdd()
31 .HasColumnType("integer");
32
33 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
34
35 b.Property<string>("ContactName")
36 .IsRequired()
37 .HasColumnType("text");
38
39 b.Property<string>("ContactNumber")
40 .IsRequired()
41 .HasColumnType("text");
42
43 b.Property<int>("Persons")
44 .HasColumnType("integer");
45
46 b.Property<int>("ReservationPlace")
47 .HasColumnType("integer");
48
49 b.Property<int>("ReservationStatus")
50 .HasColumnType("integer");
51
52 b.Property<int>("ReservationType")
53 .HasColumnType("integer");
54
55 b.Property<int>("RestaurantId")
56 .HasColumnType("integer");
57
58 b.Property<DateTime>("StartDate")
59 .HasColumnType("timestamp with time zone");
60
61 b.Property<int>("Table")
62 .HasColumnType("integer");
63
64 b.HasKey("Id");
65
66 b.HasIndex("RestaurantId");
67
68 b.ToTable("Reservations");
69 });
70
71 modelBuilder.Entity("backend.Entities.Restaurant", b =>
72 {
73 b.Property<int>("Id")
74 .ValueGeneratedOnAdd()
75 .HasColumnType("integer");
76
77 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
78
79 b.Property<string>("Name")
80 .IsRequired()
81 .HasColumnType("text");
82
83 b.Property<int?>("OwnerFk")
84 .HasColumnType("integer");
85
86 b.HasKey("Id");
87
88 b.HasIndex("OwnerFk")
89 .IsUnique();
90
91 b.ToTable("Restoraunts");
92 });
93
94 modelBuilder.Entity("backend.Entities.User", b =>
95 {
96 b.Property<int>("Id")
97 .ValueGeneratedOnAdd()
98 .HasColumnType("integer");
99
100 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
101
102 b.Property<string>("Email")
103 .IsRequired()
104 .HasColumnType("text");
105
106 b.Property<string>("Password")
107 .IsRequired()
108 .HasColumnType("text");
109
110 b.HasKey("Id");
111
112 b.ToTable("Users");
113 });
114
115 modelBuilder.Entity("backend.Entities.Reservation", b =>
116 {
117 b.HasOne("backend.Entities.Restaurant", "Restaurant")
118 .WithMany("Reservations")
119 .HasForeignKey("RestaurantId")
120 .OnDelete(DeleteBehavior.Cascade)
121 .IsRequired();
122
123 b.Navigation("Restaurant");
124 });
125
126 modelBuilder.Entity("backend.Entities.Restaurant", b =>
127 {
128 b.HasOne("backend.Entities.User", "Owner")
129 .WithOne("Restaurant")
130 .HasForeignKey("backend.Entities.Restaurant", "OwnerFk");
131
132 b.Navigation("Owner");
133 });
134
135 modelBuilder.Entity("backend.Entities.Restaurant", b =>
136 {
137 b.Navigation("Reservations");
138 });
139
140 modelBuilder.Entity("backend.Entities.User", b =>
141 {
142 b.Navigation("Restaurant")
143 .IsRequired();
144 });
145#pragma warning restore 612, 618
146 }
147 }
148}
Note: See TracBrowser for help on using the repository browser.