source: FarmatikoData/Migrations/FarmatikoDataContextModelSnapshot.cs@ dae4cde

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

Fix all bugs

  • Property mode set to 100644
File size: 14.3 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?>("PheadId")
208 .HasColumnType("integer");
209
210 b.Property<bool>("WorkAllTime")
211 .HasColumnType("boolean");
212
213 b.HasKey("Id");
214
215 b.HasIndex("PheadId");
216
217 b.ToTable("Pharmacies");
218 });
219
220 modelBuilder.Entity("FarmatikoData.Models.PharmacyHead", b =>
221 {
222 b.Property<int>("Id")
223 .ValueGeneratedOnAdd()
224 .HasColumnType("integer")
225 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
226
227 b.Property<DateTime>("CreatedOn")
228 .HasColumnType("timestamp without time zone");
229
230 b.Property<DateTime?>("DeletedOn")
231 .HasColumnType("timestamp without time zone");
232
233 b.Property<string>("Email")
234 .IsRequired()
235 .HasColumnType("text");
236
237 b.Property<string>("Name")
238 .IsRequired()
239 .HasColumnType("text");
240
241 b.Property<string>("Password")
242 .IsRequired()
243 .HasColumnType("text");
244
245 b.Property<int>("UserID")
246 .HasColumnType("integer");
247
248 b.HasKey("Id");
249
250 b.HasIndex("UserID");
251
252 b.ToTable("PharmacyHeads");
253 });
254
255 modelBuilder.Entity("FarmatikoData.Models.PharmacyHeadMedicine", b =>
256 {
257 b.Property<int>("Id")
258 .ValueGeneratedOnAdd()
259 .HasColumnType("integer")
260 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
261
262 b.Property<DateTime>("CreatedOn")
263 .HasColumnType("timestamp without time zone");
264
265 b.Property<DateTime?>("DeletedOn")
266 .HasColumnType("timestamp without time zone");
267
268 b.Property<int?>("HeadId")
269 .HasColumnType("integer");
270
271 b.Property<int>("MedicineId")
272 .HasColumnType("integer");
273
274 b.Property<int>("PheadId")
275 .HasColumnType("integer");
276
277 b.HasKey("Id");
278
279 b.HasIndex("HeadId");
280
281 b.HasIndex("MedicineId");
282
283 b.ToTable("PharmacyHeadMedicines");
284 });
285
286 modelBuilder.Entity("FarmatikoData.Models.RequestPharmacyHead", b =>
287 {
288 b.Property<int>("Id")
289 .ValueGeneratedOnAdd()
290 .HasColumnType("integer")
291 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
292
293 b.Property<DateTime>("CreatedOn")
294 .HasColumnType("timestamp without time zone");
295
296 b.Property<DateTime?>("DeletedOn")
297 .HasColumnType("timestamp without time zone");
298
299 b.Property<int?>("HeadId")
300 .HasColumnType("integer");
301
302 b.Property<int?>("PharmacyId")
303 .HasColumnType("integer");
304
305 b.HasKey("Id");
306
307 b.HasIndex("HeadId");
308
309 b.HasIndex("PharmacyId");
310
311 b.ToTable("PHRequests");
312 });
313
314 modelBuilder.Entity("FarmatikoData.Models.User", b =>
315 {
316 b.Property<int>("Id")
317 .ValueGeneratedOnAdd()
318 .HasColumnType("integer")
319 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
320
321 b.Property<DateTime>("CreatedOn")
322 .HasColumnType("timestamp without time zone");
323
324 b.Property<DateTime?>("DeletedOn")
325 .HasColumnType("timestamp without time zone");
326
327 b.Property<string>("Email")
328 .IsRequired()
329 .HasColumnType("text");
330
331 b.Property<string>("Name")
332 .IsRequired()
333 .HasColumnType("text");
334
335 b.Property<string>("Password")
336 .IsRequired()
337 .HasColumnType("text");
338
339 b.Property<int>("UserRole")
340 .HasColumnType("integer");
341
342 b.HasKey("Id");
343
344 b.ToTable("Users");
345 });
346
347 modelBuilder.Entity("FarmatikoData.Models.HealthcareWorker", b =>
348 {
349 b.HasOne("FarmatikoData.Models.HealthFacility", "Facility")
350 .WithMany()
351 .HasForeignKey("FacilityId")
352 .OnDelete(DeleteBehavior.Cascade)
353 .IsRequired();
354 });
355
356 modelBuilder.Entity("FarmatikoData.Models.Pharmacy", b =>
357 {
358 b.HasOne("FarmatikoData.Models.PharmacyHead", "PharmacyHead")
359 .WithMany("Pharmacies")
360 .HasForeignKey("PheadId");
361 });
362
363 modelBuilder.Entity("FarmatikoData.Models.PharmacyHead", b =>
364 {
365 b.HasOne("FarmatikoData.Models.User", "User")
366 .WithMany()
367 .HasForeignKey("UserID")
368 .OnDelete(DeleteBehavior.Cascade)
369 .IsRequired();
370 });
371
372 modelBuilder.Entity("FarmatikoData.Models.PharmacyHeadMedicine", b =>
373 {
374 b.HasOne("FarmatikoData.Models.PharmacyHead", "Head")
375 .WithMany("Medicines")
376 .HasForeignKey("HeadId");
377
378 b.HasOne("FarmatikoData.Models.Medicine", "Medicine")
379 .WithMany("Medicines")
380 .HasForeignKey("MedicineId")
381 .OnDelete(DeleteBehavior.Cascade)
382 .IsRequired();
383 });
384
385 modelBuilder.Entity("FarmatikoData.Models.RequestPharmacyHead", b =>
386 {
387 b.HasOne("FarmatikoData.Models.PharmacyHead", "Head")
388 .WithMany()
389 .HasForeignKey("HeadId");
390
391 b.HasOne("FarmatikoData.Models.Pharmacy", "Pharmacy")
392 .WithMany()
393 .HasForeignKey("PharmacyId");
394 });
395#pragma warning restore 612, 618
396 }
397 }
398}
Note: See TracBrowser for help on using the repository browser.