source: FarmatikoData/Migrations/FarmatikoDataContextModelSnapshot.cs@ 0a694bb

Last change on this file since 0a694bb was 0a694bb, checked in by Dimitar Slezenkovski <dslezenkovski@…>, 4 years ago

Fix create new user bug.

  • Property mode set to 100644
File size: 14.6 KB
Line 
1// <auto-generated />
2using System;
3using FarmatikoData;
4using Microsoft.EntityFrameworkCore;
5using Microsoft.EntityFrameworkCore.Infrastructure;
6using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
7using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
8
9namespace FarmatikoData.Migrations
10{
11 [DbContext(typeof(FarmatikoDataContext))]
12 partial class FarmatikoDataContextModelSnapshot : ModelSnapshot
13 {
14 protected override void BuildModel(ModelBuilder modelBuilder)
15 {
16#pragma warning disable 612, 618
17 modelBuilder
18 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn)
19 .HasAnnotation("ProductVersion", "3.1.10")
20 .HasAnnotation("Relational:MaxIdentifierLength", 63);
21
22 modelBuilder.Entity("FarmatikoData.Models.HealthFacility", b =>
23 {
24 b.Property<int>("Id")
25 .ValueGeneratedOnAdd()
26 .HasColumnType("integer")
27 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
28
29 b.Property<string>("Address")
30 .IsRequired()
31 .HasColumnType("text");
32
33 b.Property<DateTime>("CreatedOn")
34 .HasColumnType("timestamp without time zone");
35
36 b.Property<DateTime?>("DeletedOn")
37 .HasColumnType("timestamp without time zone");
38
39 b.Property<string>("Email")
40 .HasColumnType("text");
41
42 b.Property<string>("Municipality")
43 .IsRequired()
44 .HasColumnType("text");
45
46 b.Property<string>("Name")
47 .IsRequired()
48 .HasColumnType("text");
49
50 b.Property<string>("Phone")
51 .HasColumnType("text");
52
53 b.Property<string>("Type")
54 .IsRequired()
55 .HasColumnType("text");
56
57 b.HasKey("Id");
58
59 b.ToTable("HealthFacilities");
60 });
61
62 modelBuilder.Entity("FarmatikoData.Models.HealthcareWorker", b =>
63 {
64 b.Property<int>("Id")
65 .ValueGeneratedOnAdd()
66 .HasColumnType("integer")
67 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
68
69 b.Property<string>("Branch")
70 .IsRequired()
71 .HasColumnType("text");
72
73 b.Property<DateTime>("CreatedOn")
74 .HasColumnType("timestamp without time zone");
75
76 b.Property<DateTime?>("DeletedOn")
77 .HasColumnType("timestamp without time zone");
78
79 b.Property<int>("FacilityId")
80 .HasColumnType("integer");
81
82 b.Property<string>("Name")
83 .IsRequired()
84 .HasColumnType("text");
85
86 b.Property<string>("Title")
87 .HasColumnType("text");
88
89 b.HasKey("Id");
90
91 b.HasIndex("FacilityId");
92
93 b.ToTable("HealthcareWorkers");
94 });
95
96 modelBuilder.Entity("FarmatikoData.Models.Medicine", b =>
97 {
98 b.Property<int>("Id")
99 .ValueGeneratedOnAdd()
100 .HasColumnType("integer")
101 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
102
103 b.Property<DateTime>("CreatedOn")
104 .HasColumnType("timestamp without time zone");
105
106 b.Property<DateTime?>("DeletedOn")
107 .HasColumnType("timestamp without time zone");
108
109 b.Property<string>("Form")
110 .HasColumnType("text");
111
112 b.Property<string>("Manufacturer")
113 .IsRequired()
114 .HasColumnType("text");
115
116 b.Property<string>("Name")
117 .IsRequired()
118 .HasColumnType("text");
119
120 b.Property<string>("Packaging")
121 .HasColumnType("text");
122
123 b.Property<float>("Price")
124 .HasColumnType("real");
125
126 b.Property<string>("Strength")
127 .IsRequired()
128 .HasColumnType("text");
129
130 b.Property<string>("WayOfIssuing")
131 .IsRequired()
132 .HasColumnType("text");
133
134 b.HasKey("Id");
135
136 b.ToTable("Medicines");
137 });
138
139 modelBuilder.Entity("FarmatikoData.Models.Pandemic", b =>
140 {
141 b.Property<int>("Id")
142 .ValueGeneratedOnAdd()
143 .HasColumnType("integer")
144 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
145
146 b.Property<long>("ActiveGlobal")
147 .HasColumnType("bigint");
148
149 b.Property<int>("ActiveMK")
150 .HasColumnType("integer");
151
152 b.Property<DateTime>("CreatedOn")
153 .HasColumnType("timestamp without time zone");
154
155 b.Property<long>("DeathsGlobal")
156 .HasColumnType("bigint");
157
158 b.Property<int>("DeathsMK")
159 .HasColumnType("integer");
160
161 b.Property<DateTime?>("DeletedOn")
162 .HasColumnType("timestamp without time zone");
163
164 b.Property<string>("Name")
165 .IsRequired()
166 .HasColumnType("text");
167
168 b.Property<int>("NewMK")
169 .HasColumnType("integer");
170
171 b.Property<long>("TotalGlobal")
172 .HasColumnType("bigint");
173
174 b.Property<int>("TotalMK")
175 .HasColumnType("integer");
176
177 b.HasKey("Id");
178
179 b.ToTable("Pandemics");
180 });
181
182 modelBuilder.Entity("FarmatikoData.Models.Pharmacy", b =>
183 {
184 b.Property<int>("Id")
185 .ValueGeneratedOnAdd()
186 .HasColumnType("integer")
187 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
188
189 b.Property<string>("Address")
190 .IsRequired()
191 .HasColumnType("text");
192
193 b.Property<DateTime>("CreatedOn")
194 .HasColumnType("timestamp without time zone");
195
196 b.Property<DateTime?>("DeletedOn")
197 .HasColumnType("timestamp without time zone");
198
199 b.Property<string>("Location")
200 .IsRequired()
201 .HasColumnType("text");
202
203 b.Property<string>("Name")
204 .IsRequired()
205 .HasColumnType("text");
206
207 b.Property<int?>("PharmacyHeadId")
208 .HasColumnType("integer");
209
210 b.Property<int>("PheadId")
211 .HasColumnType("integer");
212
213 b.Property<bool>("WorkAllTime")
214 .HasColumnType("boolean");
215
216 b.HasKey("Id");
217
218 b.HasIndex("PharmacyHeadId");
219
220 b.ToTable("Pharmacies");
221 });
222
223 modelBuilder.Entity("FarmatikoData.Models.PharmacyHead", b =>
224 {
225 b.Property<int>("Id")
226 .ValueGeneratedOnAdd()
227 .HasColumnType("integer")
228 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
229
230 b.Property<DateTime>("CreatedOn")
231 .HasColumnType("timestamp without time zone");
232
233 b.Property<DateTime?>("DeletedOn")
234 .HasColumnType("timestamp without time zone");
235
236 b.Property<string>("Email")
237 .IsRequired()
238 .HasColumnType("text");
239
240 b.Property<string>("Name")
241 .IsRequired()
242 .HasColumnType("text");
243
244 b.Property<string>("Password")
245 .IsRequired()
246 .HasColumnType("text");
247
248 b.Property<int>("UserID")
249 .HasColumnType("integer");
250
251 b.HasKey("Id");
252
253 b.HasIndex("UserID");
254
255 b.ToTable("PharmacyHeads");
256 });
257
258 modelBuilder.Entity("FarmatikoData.Models.PharmacyHeadMedicine", b =>
259 {
260 b.Property<int>("Id")
261 .ValueGeneratedOnAdd()
262 .HasColumnType("integer")
263 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
264
265 b.Property<DateTime>("CreatedOn")
266 .HasColumnType("timestamp without time zone");
267
268 b.Property<DateTime?>("DeletedOn")
269 .HasColumnType("timestamp without time zone");
270
271 b.Property<int?>("HeadId")
272 .HasColumnType("integer");
273
274 b.Property<int>("MedicineId")
275 .HasColumnType("integer");
276
277 b.Property<int>("PheadId")
278 .HasColumnType("integer");
279
280 b.HasKey("Id");
281
282 b.HasIndex("HeadId");
283
284 b.HasIndex("MedicineId");
285
286 b.ToTable("PharmacyHeadMedicines");
287 });
288
289 modelBuilder.Entity("FarmatikoData.Models.RequestPharmacyHead", b =>
290 {
291 b.Property<int>("Id")
292 .ValueGeneratedOnAdd()
293 .HasColumnType("integer")
294 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
295
296 b.Property<DateTime>("CreatedOn")
297 .HasColumnType("timestamp without time zone");
298
299 b.Property<DateTime?>("DeletedOn")
300 .HasColumnType("timestamp without time zone");
301
302 b.Property<int>("HeadId")
303 .HasColumnType("integer");
304
305 b.Property<int>("PharmacyId")
306 .HasColumnType("integer");
307
308 b.HasKey("Id");
309
310 b.HasIndex("HeadId");
311
312 b.HasIndex("PharmacyId");
313
314 b.ToTable("PHRequests");
315 });
316
317 modelBuilder.Entity("FarmatikoData.Models.User", b =>
318 {
319 b.Property<int>("Id")
320 .ValueGeneratedOnAdd()
321 .HasColumnType("integer")
322 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
323
324 b.Property<DateTime>("CreatedOn")
325 .HasColumnType("timestamp without time zone");
326
327 b.Property<DateTime?>("DeletedOn")
328 .HasColumnType("timestamp without time zone");
329
330 b.Property<string>("Email")
331 .IsRequired()
332 .HasColumnType("text");
333
334 b.Property<string>("Name")
335 .IsRequired()
336 .HasColumnType("text");
337
338 b.Property<string>("Password")
339 .IsRequired()
340 .HasColumnType("text");
341
342 b.Property<int>("UserRole")
343 .HasColumnType("integer");
344
345 b.HasKey("Id");
346
347 b.ToTable("Users");
348 });
349
350 modelBuilder.Entity("FarmatikoData.Models.HealthcareWorker", b =>
351 {
352 b.HasOne("FarmatikoData.Models.HealthFacility", "Facility")
353 .WithMany()
354 .HasForeignKey("FacilityId")
355 .OnDelete(DeleteBehavior.Cascade)
356 .IsRequired();
357 });
358
359 modelBuilder.Entity("FarmatikoData.Models.Pharmacy", b =>
360 {
361 b.HasOne("FarmatikoData.Models.PharmacyHead", "PharmacyHead")
362 .WithMany("Pharmacies")
363 .HasForeignKey("PharmacyHeadId");
364 });
365
366 modelBuilder.Entity("FarmatikoData.Models.PharmacyHead", b =>
367 {
368 b.HasOne("FarmatikoData.Models.User", "User")
369 .WithMany()
370 .HasForeignKey("UserID")
371 .OnDelete(DeleteBehavior.Cascade)
372 .IsRequired();
373 });
374
375 modelBuilder.Entity("FarmatikoData.Models.PharmacyHeadMedicine", b =>
376 {
377 b.HasOne("FarmatikoData.Models.PharmacyHead", "Head")
378 .WithMany("Medicines")
379 .HasForeignKey("HeadId");
380
381 b.HasOne("FarmatikoData.Models.Medicine", "Medicine")
382 .WithMany("Medicines")
383 .HasForeignKey("MedicineId")
384 .OnDelete(DeleteBehavior.Cascade)
385 .IsRequired();
386 });
387
388 modelBuilder.Entity("FarmatikoData.Models.RequestPharmacyHead", b =>
389 {
390 b.HasOne("FarmatikoData.Models.PharmacyHead", "Head")
391 .WithMany()
392 .HasForeignKey("HeadId")
393 .OnDelete(DeleteBehavior.Cascade)
394 .IsRequired();
395
396 b.HasOne("FarmatikoData.Models.Pharmacy", "Pharmacy")
397 .WithMany()
398 .HasForeignKey("PharmacyId")
399 .OnDelete(DeleteBehavior.Cascade)
400 .IsRequired();
401 });
402#pragma warning restore 612, 618
403 }
404 }
405}
Note: See TracBrowser for help on using the repository browser.