source: FarmatikoData/Migrations/20210124191844_InitialMigration.Designer.cs@ db484c9

Last change on this file since db484c9 was db484c9, checked in by DimitarSlezenkovski <dslezenkovski@…>, 23 months ago

Fix bugs

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