source: FarmatikoData/Migrations/20201111183247_InitialMigration.Designer.cs@ 1db5673

Last change on this file since 1db5673 was 1db5673, checked in by DimitarSlezenkovski <dslezenkovski@…>, 3 years ago

Fix bugs, add some more

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