source: FarmatikoData/Migrations/20201104230858_InitialMigration.Designer.cs@ d23bf72

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

Add SystemService, Auth, fix a lil bugs :)

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