source: resTools_backend/backend/Migrations/20220808143757_Auth-changes-nullable.Designer.cs

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

full auth flow

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