source: FarmatikoData/Migrations/FarmatikoDataContextModelSnapshot.cs@ 8e74e2f

Last change on this file since 8e74e2f was 8e74e2f, checked in by DimitarSlezenkovski <dslezenkovski@…>, 2 years ago

Fix bugs, add some more.

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