source: FarmatikoData/Migrations/FarmatikoDataContextModelSnapshot.cs@ ac51326

Last change on this file since ac51326 was db484c9, checked in by DimitarSlezenkovski <dslezenkovski@…>, 4 years ago

Fix bugs

  • Property mode set to 100644
File size: 15.0 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:IdentitySequenceOptions", "'1', '1', '', '', 'False', '1'")
102 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
103
104 b.Property<DateTime>("CreatedOn")
105 .HasColumnType("timestamp without time zone");
106
107 b.Property<DateTime?>("DeletedOn")
108 .HasColumnType("timestamp without time zone");
109
110 b.Property<string>("Form")
111 .HasColumnType("text");
112
113 b.Property<string>("Manufacturer")
114 .IsRequired()
115 .HasColumnType("text");
116
117 b.Property<string>("Name")
118 .IsRequired()
119 .HasColumnType("text");
120
121 b.Property<string>("Packaging")
122 .HasColumnType("text");
123
124 b.Property<float>("Price")
125 .HasColumnType("real");
126
127 b.Property<string>("Strength")
128 .IsRequired()
129 .HasColumnType("text");
130
131 b.Property<string>("WayOfIssuing")
132 .IsRequired()
133 .HasColumnType("text");
134
135 b.HasKey("Id");
136
137 b.ToTable("Medicines");
138 });
139
140 modelBuilder.Entity("FarmatikoData.Models.Pandemic", b =>
141 {
142 b.Property<int>("Id")
143 .ValueGeneratedOnAdd()
144 .HasColumnType("integer")
145 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
146
147 b.Property<long>("ActiveGlobal")
148 .HasColumnType("bigint");
149
150 b.Property<int>("ActiveMK")
151 .HasColumnType("integer");
152
153 b.Property<DateTime>("CreatedOn")
154 .HasColumnType("timestamp without time zone");
155
156 b.Property<long>("DeathsGlobal")
157 .HasColumnType("bigint");
158
159 b.Property<int>("DeathsMK")
160 .HasColumnType("integer");
161
162 b.Property<DateTime?>("DeletedOn")
163 .HasColumnType("timestamp without time zone");
164
165 b.Property<string>("Name")
166 .IsRequired()
167 .HasColumnType("text");
168
169 b.Property<int>("NewMK")
170 .HasColumnType("integer");
171
172 b.Property<long>("TotalGlobal")
173 .HasColumnType("bigint");
174
175 b.Property<int>("TotalMK")
176 .HasColumnType("integer");
177
178 b.HasKey("Id");
179
180 b.ToTable("Pandemics");
181 });
182
183 modelBuilder.Entity("FarmatikoData.Models.Pharmacy", b =>
184 {
185 b.Property<int>("Id")
186 .ValueGeneratedOnAdd()
187 .HasColumnType("integer")
188 .HasAnnotation("Npgsql:IdentitySequenceOptions", "'1', '1', '', '', 'False', '1'")
189 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
190
191 b.Property<string>("Address")
192 .IsRequired()
193 .HasColumnType("text");
194
195 b.Property<DateTime>("CreatedOn")
196 .HasColumnType("timestamp without time zone");
197
198 b.Property<DateTime?>("DeletedOn")
199 .HasColumnType("timestamp without time zone");
200
201 b.Property<string>("Location")
202 .IsRequired()
203 .HasColumnType("text");
204
205 b.Property<string>("Name")
206 .IsRequired()
207 .HasColumnType("text");
208
209 b.Property<int?>("PharmacyHeadId")
210 .HasColumnType("integer");
211
212 b.Property<int>("PheadId")
213 .HasColumnType("integer");
214
215 b.Property<bool>("WorkAllTime")
216 .HasColumnType("boolean");
217
218 b.HasKey("Id");
219
220 b.HasIndex("PharmacyHeadId");
221
222 b.ToTable("Pharmacies");
223 });
224
225 modelBuilder.Entity("FarmatikoData.Models.PharmacyHead", b =>
226 {
227 b.Property<int>("Id")
228 .ValueGeneratedOnAdd()
229 .HasColumnType("integer")
230 .HasAnnotation("Npgsql:IdentitySequenceOptions", "'1', '1', '', '', 'False', '1'")
231 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
232
233 b.Property<DateTime>("CreatedOn")
234 .HasColumnType("timestamp without time zone");
235
236 b.Property<DateTime?>("DeletedOn")
237 .HasColumnType("timestamp without time zone");
238
239 b.Property<string>("Email")
240 .IsRequired()
241 .HasColumnType("text");
242
243 b.Property<string>("Name")
244 .IsRequired()
245 .HasColumnType("text");
246
247 b.Property<string>("Password")
248 .IsRequired()
249 .HasColumnType("text");
250
251 b.Property<int?>("UserId")
252 .HasColumnType("integer");
253
254 b.HasKey("Id");
255
256 b.HasIndex("UserId");
257
258 b.ToTable("PharmacyHeads");
259 });
260
261 modelBuilder.Entity("FarmatikoData.Models.PharmacyHeadMedicine", b =>
262 {
263 b.Property<int>("Id")
264 .ValueGeneratedOnAdd()
265 .HasColumnType("integer")
266 .HasAnnotation("Npgsql:IdentitySequenceOptions", "'1', '1', '', '', 'False', '1'")
267 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
268
269 b.Property<DateTime>("CreatedOn")
270 .HasColumnType("timestamp without time zone");
271
272 b.Property<DateTime?>("DeletedOn")
273 .HasColumnType("timestamp without time zone");
274
275 b.Property<int?>("HeadId")
276 .HasColumnType("integer");
277
278 b.Property<int>("MedicineId")
279 .HasColumnType("integer");
280
281 b.Property<int>("PheadId")
282 .HasColumnType("integer");
283
284 b.HasKey("Id");
285
286 b.HasIndex("HeadId");
287
288 b.HasIndex("MedicineId");
289
290 b.ToTable("PharmacyHeadMedicines");
291 });
292
293 modelBuilder.Entity("FarmatikoData.Models.RequestPharmacyHead", b =>
294 {
295 b.Property<int>("Id")
296 .ValueGeneratedOnAdd()
297 .HasColumnType("integer")
298 .HasAnnotation("Npgsql:IdentitySequenceOptions", "'1', '1', '', '', 'False', '1'")
299 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
300
301 b.Property<DateTime>("CreatedOn")
302 .HasColumnType("timestamp without time zone");
303
304 b.Property<DateTime?>("DeletedOn")
305 .HasColumnType("timestamp without time zone");
306
307 b.Property<int>("HeadId")
308 .HasColumnType("integer");
309
310 b.Property<int>("PharmacyId")
311 .HasColumnType("integer");
312
313 b.HasKey("Id");
314
315 b.HasIndex("HeadId");
316
317 b.HasIndex("PharmacyId");
318
319 b.ToTable("PHRequests");
320 });
321
322 modelBuilder.Entity("FarmatikoData.Models.User", b =>
323 {
324 b.Property<int>("Id")
325 .ValueGeneratedOnAdd()
326 .HasColumnType("integer")
327 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
328
329 b.Property<DateTime>("CreatedOn")
330 .HasColumnType("timestamp without time zone");
331
332 b.Property<DateTime?>("DeletedOn")
333 .HasColumnType("timestamp without time zone");
334
335 b.Property<string>("Email")
336 .IsRequired()
337 .HasColumnType("text");
338
339 b.Property<string>("Name")
340 .IsRequired()
341 .HasColumnType("text");
342
343 b.Property<string>("Password")
344 .IsRequired()
345 .HasColumnType("text");
346
347 b.Property<int>("UserRole")
348 .HasColumnType("integer");
349
350 b.HasKey("Id");
351
352 b.ToTable("Users");
353 });
354
355 modelBuilder.Entity("FarmatikoData.Models.HealthcareWorker", b =>
356 {
357 b.HasOne("FarmatikoData.Models.HealthFacility", "Facility")
358 .WithMany()
359 .HasForeignKey("FacilityId")
360 .OnDelete(DeleteBehavior.Cascade)
361 .IsRequired();
362 });
363
364 modelBuilder.Entity("FarmatikoData.Models.Pharmacy", b =>
365 {
366 b.HasOne("FarmatikoData.Models.PharmacyHead", "PharmacyHead")
367 .WithMany("Pharmacies")
368 .HasForeignKey("PharmacyHeadId");
369 });
370
371 modelBuilder.Entity("FarmatikoData.Models.PharmacyHead", b =>
372 {
373 b.HasOne("FarmatikoData.Models.User", "User")
374 .WithMany()
375 .HasForeignKey("UserId");
376 });
377
378 modelBuilder.Entity("FarmatikoData.Models.PharmacyHeadMedicine", b =>
379 {
380 b.HasOne("FarmatikoData.Models.PharmacyHead", "Head")
381 .WithMany("Medicines")
382 .HasForeignKey("HeadId");
383
384 b.HasOne("FarmatikoData.Models.Medicine", "Medicine")
385 .WithMany("Medicines")
386 .HasForeignKey("MedicineId")
387 .OnDelete(DeleteBehavior.Cascade)
388 .IsRequired();
389 });
390
391 modelBuilder.Entity("FarmatikoData.Models.RequestPharmacyHead", b =>
392 {
393 b.HasOne("FarmatikoData.Models.PharmacyHead", "Head")
394 .WithMany()
395 .HasForeignKey("HeadId")
396 .OnDelete(DeleteBehavior.Cascade)
397 .IsRequired();
398
399 b.HasOne("FarmatikoData.Models.Pharmacy", "Pharmacy")
400 .WithMany()
401 .HasForeignKey("PharmacyId")
402 .OnDelete(DeleteBehavior.Cascade)
403 .IsRequired();
404 });
405#pragma warning restore 612, 618
406 }
407 }
408}
Note: See TracBrowser for help on using the repository browser.