source: FarmatikoData/Migrations/FarmatikoDataContextModelSnapshot.cs@ afc9a9a

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

Add migration and stuff

  • Property mode set to 100644
File size: 14.0 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<float>("Price")
124 .HasColumnType("real");
125
126 b.Property<string>("Strength")
127 .IsRequired()
128 .HasColumnType("text");
129
130 b.Property<string>("WayOfIssuing")
131 .IsRequired()
132 .HasColumnType("text");
133
134 b.HasKey("Id");
135
136 b.ToTable("Medicines");
137 });
138
139 modelBuilder.Entity("FarmatikoData.Models.MedicineList", b =>
140 {
141 b.Property<int>("Id")
142 .ValueGeneratedOnAdd()
143 .HasColumnType("integer")
144 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
145
146 b.Property<DateTime>("CreatedOn")
147 .HasColumnType("timestamp without time zone");
148
149 b.Property<DateTime?>("DeletedOn")
150 .HasColumnType("timestamp without time zone");
151
152 b.Property<bool>("HasMedicine")
153 .HasColumnType("boolean");
154
155 b.Property<int>("MedicineId")
156 .HasColumnType("integer");
157
158 b.Property<int?>("PharmacyHeadId")
159 .HasColumnType("integer");
160
161 b.HasKey("Id");
162
163 b.HasIndex("MedicineId");
164
165 b.HasIndex("PharmacyHeadId");
166
167 b.ToTable("MedicineList");
168 });
169
170 modelBuilder.Entity("FarmatikoData.Models.Pandemic", b =>
171 {
172 b.Property<int>("Id")
173 .ValueGeneratedOnAdd()
174 .HasColumnType("integer")
175 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
176
177 b.Property<long>("ActiveGlobal")
178 .HasColumnType("bigint");
179
180 b.Property<int>("ActiveMK")
181 .HasColumnType("integer");
182
183 b.Property<DateTime>("CreatedOn")
184 .HasColumnType("timestamp without time zone");
185
186 b.Property<long>("DeathsGlobal")
187 .HasColumnType("bigint");
188
189 b.Property<int>("DeathsMK")
190 .HasColumnType("integer");
191
192 b.Property<DateTime?>("DeletedOn")
193 .HasColumnType("timestamp without time zone");
194
195 b.Property<string>("Name")
196 .IsRequired()
197 .HasColumnType("text");
198
199 b.Property<int>("NewMK")
200 .HasColumnType("integer");
201
202 b.Property<long>("TotalGlobal")
203 .HasColumnType("bigint");
204
205 b.Property<int>("TotalMK")
206 .HasColumnType("integer");
207
208 b.HasKey("Id");
209
210 b.ToTable("Pandemics");
211 });
212
213 modelBuilder.Entity("FarmatikoData.Models.Pharmacy", b =>
214 {
215 b.Property<int>("Id")
216 .ValueGeneratedOnAdd()
217 .HasColumnType("integer")
218 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
219
220 b.Property<string>("Address")
221 .IsRequired()
222 .HasColumnType("text");
223
224 b.Property<DateTime>("CreatedOn")
225 .HasColumnType("timestamp without time zone");
226
227 b.Property<DateTime?>("DeletedOn")
228 .HasColumnType("timestamp without time zone");
229
230 b.Property<string>("Location")
231 .IsRequired()
232 .HasColumnType("text");
233
234 b.Property<string>("Name")
235 .IsRequired()
236 .HasColumnType("text");
237
238 b.Property<int?>("PharmacyHeadId")
239 .HasColumnType("integer");
240
241 b.Property<bool>("WorkAllTime")
242 .HasColumnType("boolean");
243
244 b.HasKey("Id");
245
246 b.HasIndex("PharmacyHeadId");
247
248 b.ToTable("Pharmacies");
249 });
250
251 modelBuilder.Entity("FarmatikoData.Models.PharmacyHead", b =>
252 {
253 b.Property<int>("Id")
254 .ValueGeneratedOnAdd()
255 .HasColumnType("integer")
256 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
257
258 b.Property<DateTime>("CreatedOn")
259 .HasColumnType("timestamp without time zone");
260
261 b.Property<DateTime?>("DeletedOn")
262 .HasColumnType("timestamp without time zone");
263
264 b.Property<string>("Email")
265 .IsRequired()
266 .HasColumnType("text");
267
268 b.Property<string>("Name")
269 .IsRequired()
270 .HasColumnType("text");
271
272 b.Property<string>("Password")
273 .IsRequired()
274 .HasColumnType("text");
275
276 b.HasKey("Id");
277
278 b.ToTable("PharmacyHeads");
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.MedicineList", b =>
349 {
350 b.HasOne("FarmatikoData.Models.Medicine", "Medicine")
351 .WithMany()
352 .HasForeignKey("MedicineId")
353 .OnDelete(DeleteBehavior.Cascade)
354 .IsRequired();
355
356 b.HasOne("FarmatikoData.Models.PharmacyHead", null)
357 .WithMany("MedicineLists")
358 .HasForeignKey("PharmacyHeadId");
359 });
360
361 modelBuilder.Entity("FarmatikoData.Models.Pharmacy", b =>
362 {
363 b.HasOne("FarmatikoData.Models.PharmacyHead", null)
364 .WithMany("PharmaciesList")
365 .HasForeignKey("PharmacyHeadId");
366 });
367
368 modelBuilder.Entity("FarmatikoData.Models.RequestPharmacyHead", b =>
369 {
370 b.HasOne("FarmatikoData.Models.PharmacyHead", "Head")
371 .WithMany()
372 .HasForeignKey("HeadId")
373 .OnDelete(DeleteBehavior.Cascade)
374 .IsRequired();
375
376 b.HasOne("FarmatikoData.Models.Pharmacy", "Pharmacy")
377 .WithMany()
378 .HasForeignKey("PharmacyId")
379 .OnDelete(DeleteBehavior.Cascade)
380 .IsRequired();
381 });
382#pragma warning restore 612, 618
383 }
384 }
385}
Note: See TracBrowser for help on using the repository browser.