source: resTools_backend/backend/Migrations/20220918134340_MenuUpdatesAndVIP.Designer.cs

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

vip functionallity + menu fields + alergens filtering + google/fb login + email queueing

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