source: resTools_backend/backend/Migrations/20220824133642_Priority-ToDO.Designer.cs

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

todo items full functionality

  • Property mode set to 100644
File size: 10.7 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("20220824133642_Priority-ToDO")]
16 partial class PriorityToDO
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.ToDoItem", b =>
173 {
174 b.Property<int>("Id")
175 .ValueGeneratedOnAdd()
176 .HasColumnType("integer");
177
178 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
179
180 b.Property<DateTime>("CreatedAt")
181 .HasColumnType("timestamp with time zone");
182
183 b.Property<string>("Description")
184 .IsRequired()
185 .HasColumnType("text");
186
187 b.Property<int?>("LinkedReviewId")
188 .HasColumnType("integer");
189
190 b.Property<int>("Priority")
191 .HasColumnType("integer");
192
193 b.Property<int>("Status")
194 .HasColumnType("integer");
195
196 b.Property<string>("Title")
197 .IsRequired()
198 .HasColumnType("text");
199
200 b.HasKey("Id");
201
202 b.HasIndex("LinkedReviewId");
203
204 b.ToTable("ToDoItems");
205 });
206
207 modelBuilder.Entity("backend.Entities.User", b =>
208 {
209 b.Property<int>("Id")
210 .ValueGeneratedOnAdd()
211 .HasColumnType("integer");
212
213 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
214
215 b.Property<string>("ConfirmationURL")
216 .HasColumnType("text");
217
218 b.Property<DateTime?>("ConfirmationValidTo")
219 .HasColumnType("timestamp with time zone");
220
221 b.Property<string>("Email")
222 .IsRequired()
223 .HasColumnType("text");
224
225 b.Property<bool>("IsAdmin")
226 .HasColumnType("boolean");
227
228 b.Property<bool>("IsConfirmed")
229 .HasColumnType("boolean");
230
231 b.Property<string>("Password")
232 .IsRequired()
233 .HasColumnType("text");
234
235 b.Property<string>("PasswordResetURL")
236 .HasColumnType("text");
237
238 b.Property<DateTime?>("PasswordResetValidTo")
239 .HasColumnType("timestamp with time zone");
240
241 b.HasKey("Id");
242
243 b.ToTable("Users");
244 });
245
246 modelBuilder.Entity("backend.Entities.MenuItem", b =>
247 {
248 b.HasOne("backend.Entities.Restaurant", "Restaurant")
249 .WithMany("Menu")
250 .HasForeignKey("RestaurantId")
251 .OnDelete(DeleteBehavior.Cascade)
252 .IsRequired();
253
254 b.Navigation("Restaurant");
255 });
256
257 modelBuilder.Entity("backend.Entities.Reservation", b =>
258 {
259 b.HasOne("backend.Entities.Restaurant", "Restaurant")
260 .WithMany("Reservations")
261 .HasForeignKey("RestaurantId")
262 .OnDelete(DeleteBehavior.Cascade)
263 .IsRequired();
264
265 b.Navigation("Restaurant");
266 });
267
268 modelBuilder.Entity("backend.Entities.Restaurant", b =>
269 {
270 b.HasOne("backend.Entities.User", "Owner")
271 .WithOne("Restaurant")
272 .HasForeignKey("backend.Entities.Restaurant", "OwnerFk");
273
274 b.Navigation("Owner");
275 });
276
277 modelBuilder.Entity("backend.Entities.Review", b =>
278 {
279 b.HasOne("backend.Entities.Restaurant", "Restaurant")
280 .WithMany("Reviews")
281 .HasForeignKey("RestaurantId")
282 .OnDelete(DeleteBehavior.Cascade)
283 .IsRequired();
284
285 b.HasOne("backend.Entities.User", "User")
286 .WithMany()
287 .HasForeignKey("UserId")
288 .OnDelete(DeleteBehavior.Cascade)
289 .IsRequired();
290
291 b.Navigation("Restaurant");
292
293 b.Navigation("User");
294 });
295
296 modelBuilder.Entity("backend.Entities.ToDoItem", b =>
297 {
298 b.HasOne("backend.Entities.Review", "LinkedReview")
299 .WithMany()
300 .HasForeignKey("LinkedReviewId");
301
302 b.Navigation("LinkedReview");
303 });
304
305 modelBuilder.Entity("backend.Entities.Restaurant", b =>
306 {
307 b.Navigation("Menu");
308
309 b.Navigation("Reservations");
310
311 b.Navigation("Reviews");
312 });
313
314 modelBuilder.Entity("backend.Entities.User", b =>
315 {
316 b.Navigation("Restaurant")
317 .IsRequired();
318 });
319#pragma warning restore 612, 618
320 }
321 }
322}
Note: See TracBrowser for help on using the repository browser.