source: FarmatikoData/Migrations/20210208041424_Initial-Create.Designer.cs

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