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