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