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