source: resTools_backend/backend/Migrations/20220808143343_Auth-changes.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("20220808143343_Auth-changes")]
16 partial class Authchanges
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 .IsRequired()
182 .HasColumnType("text");
183
184 b.Property<DateTime>("ConfirmationValidTo")
185 .HasColumnType("timestamp with time zone");
186
187 b.Property<string>("Email")
188 .IsRequired()
189 .HasColumnType("text");
190
191 b.Property<bool>("IsAdmin")
192 .HasColumnType("boolean");
193
194 b.Property<bool>("IsConfirmed")
195 .HasColumnType("boolean");
196
197 b.Property<string>("Password")
198 .IsRequired()
199 .HasColumnType("text");
200
201 b.Property<string>("PasswordResetURL")
202 .IsRequired()
203 .HasColumnType("text");
204
205 b.Property<DateTime>("PasswordResetValidTo")
206 .HasColumnType("timestamp with time zone");
207
208 b.HasKey("Id");
209
210 b.ToTable("Users");
211 });
212
213 modelBuilder.Entity("backend.Entities.MenuItem", b =>
214 {
215 b.HasOne("backend.Entities.Restaurant", "Restaurant")
216 .WithMany("Menu")
217 .HasForeignKey("RestaurantId")
218 .OnDelete(DeleteBehavior.Cascade)
219 .IsRequired();
220
221 b.Navigation("Restaurant");
222 });
223
224 modelBuilder.Entity("backend.Entities.Reservation", b =>
225 {
226 b.HasOne("backend.Entities.Restaurant", "Restaurant")
227 .WithMany("Reservations")
228 .HasForeignKey("RestaurantId")
229 .OnDelete(DeleteBehavior.Cascade)
230 .IsRequired();
231
232 b.Navigation("Restaurant");
233 });
234
235 modelBuilder.Entity("backend.Entities.Restaurant", b =>
236 {
237 b.HasOne("backend.Entities.User", "Owner")
238 .WithOne("Restaurant")
239 .HasForeignKey("backend.Entities.Restaurant", "OwnerFk");
240
241 b.Navigation("Owner");
242 });
243
244 modelBuilder.Entity("backend.Entities.Review", b =>
245 {
246 b.HasOne("backend.Entities.Restaurant", "Restaurant")
247 .WithMany("Reviews")
248 .HasForeignKey("RestaurantId")
249 .OnDelete(DeleteBehavior.Cascade)
250 .IsRequired();
251
252 b.HasOne("backend.Entities.User", "User")
253 .WithMany()
254 .HasForeignKey("UserId")
255 .OnDelete(DeleteBehavior.Cascade)
256 .IsRequired();
257
258 b.Navigation("Restaurant");
259
260 b.Navigation("User");
261 });
262
263 modelBuilder.Entity("backend.Entities.Restaurant", b =>
264 {
265 b.Navigation("Menu");
266
267 b.Navigation("Reservations");
268
269 b.Navigation("Reviews");
270 });
271
272 modelBuilder.Entity("backend.Entities.User", b =>
273 {
274 b.Navigation("Restaurant")
275 .IsRequired();
276 });
277#pragma warning restore 612, 618
278 }
279 }
280}
Note: See TracBrowser for help on using the repository browser.