source: FarmatikoData/Migrations/FarmatikoDataContextModelSnapshot.cs@ 1db5673

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

Fix bugs, add some more

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