source: FarmatikoData/Migrations/20200722131856_Initial migration.Designer.cs@ de18858

Last change on this file since de18858 was a8ccc2c, checked in by DimitarSlezenkovski <dslezenkovski@…>, 4 years ago

Add migration, BaseEntity class and FarmatikoServices

  • Property mode set to 100644
File size: 12.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("20200722131856_Initial migration")]
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.HealthFacilities", 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.HealthcareWorkers", 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 .HasColumnType("text");
116
117 b.Property<int?>("MedicineListId")
118 .HasColumnType("integer");
119
120 b.Property<string>("Name")
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 .HasColumnType("text");
131
132 b.Property<string>("WayOfIssuing")
133 .HasColumnType("text");
134
135 b.HasKey("Id");
136
137 b.HasIndex("MedicineListId");
138
139 b.ToTable("Medicines");
140 });
141
142 modelBuilder.Entity("FarmatikoData.Models.MedicineList", b =>
143 {
144 b.Property<int>("Id")
145 .ValueGeneratedOnAdd()
146 .HasColumnType("integer")
147 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
148
149 b.Property<DateTime>("CreatedOn")
150 .HasColumnType("timestamp without time zone");
151
152 b.Property<DateTime>("DeletedOn")
153 .HasColumnType("timestamp without time zone");
154
155 b.Property<bool>("HasMedicine")
156 .HasColumnType("boolean");
157
158 b.Property<int?>("MedicinesId")
159 .HasColumnType("integer");
160
161 b.Property<int?>("PharmacyHeadId")
162 .HasColumnType("integer");
163
164 b.HasKey("Id");
165
166 b.HasIndex("MedicinesId");
167
168 b.HasIndex("PharmacyHeadId");
169
170 b.ToTable("MedicineLists");
171 });
172
173 modelBuilder.Entity("FarmatikoData.Models.Pandemic", b =>
174 {
175 b.Property<int>("Id")
176 .ValueGeneratedOnAdd()
177 .HasColumnType("integer")
178 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
179
180 b.Property<int>("ActiveGlobal")
181 .HasColumnType("integer");
182
183 b.Property<int>("ActiveMK")
184 .HasColumnType("integer");
185
186 b.Property<DateTime>("CreatedOn")
187 .HasColumnType("timestamp without time zone");
188
189 b.Property<int>("DeathsGlobal")
190 .HasColumnType("integer");
191
192 b.Property<int>("DeathsMK")
193 .HasColumnType("integer");
194
195 b.Property<DateTime>("DeletedOn")
196 .HasColumnType("timestamp without time zone");
197
198 b.Property<string>("Name")
199 .HasColumnType("text");
200
201 b.Property<int>("NewMK")
202 .HasColumnType("integer");
203
204 b.Property<int>("TotalGlobal")
205 .HasColumnType("integer");
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 .HasColumnType("text");
224
225 b.Property<DateTime>("CreatedOn")
226 .HasColumnType("timestamp without time zone");
227
228 b.Property<DateTime>("DeletedOn")
229 .HasColumnType("timestamp without time zone");
230
231 b.Property<string>("Location")
232 .HasColumnType("text");
233
234 b.Property<string>("Name")
235 .HasColumnType("text");
236
237 b.Property<int?>("PharmacyHeadId")
238 .HasColumnType("integer");
239
240 b.Property<bool>("WorkAllTime")
241 .HasColumnType("boolean");
242
243 b.HasKey("Id");
244
245 b.HasIndex("PharmacyHeadId");
246
247 b.ToTable("Pharmacies");
248 });
249
250 modelBuilder.Entity("FarmatikoData.Models.PharmacyHead", b =>
251 {
252 b.Property<int>("Id")
253 .ValueGeneratedOnAdd()
254 .HasColumnType("integer")
255 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
256
257 b.Property<DateTime>("CreatedOn")
258 .HasColumnType("timestamp without time zone");
259
260 b.Property<DateTime>("DeletedOn")
261 .HasColumnType("timestamp without time zone");
262
263 b.Property<string>("Email")
264 .HasColumnType("text");
265
266 b.Property<string>("Name")
267 .HasColumnType("text");
268
269 b.Property<string>("Password")
270 .HasColumnType("text");
271
272 b.Property<int?>("PharmacyId")
273 .HasColumnType("integer");
274
275 b.Property<int?>("PharmacyMedicinesId")
276 .HasColumnType("integer");
277
278 b.HasKey("Id");
279
280 b.HasIndex("PharmacyId");
281
282 b.HasIndex("PharmacyMedicinesId");
283
284 b.ToTable("PharmacyHeads");
285 });
286
287 modelBuilder.Entity("FarmatikoData.Models.HealthcareWorkers", b =>
288 {
289 b.HasOne("FarmatikoData.Models.HealthFacilities", "Facility")
290 .WithMany()
291 .HasForeignKey("FacilityId")
292 .OnDelete(DeleteBehavior.Cascade)
293 .IsRequired();
294 });
295
296 modelBuilder.Entity("FarmatikoData.Models.Medicine", b =>
297 {
298 b.HasOne("FarmatikoData.Models.MedicineList", null)
299 .WithMany("MedicinesList")
300 .HasForeignKey("MedicineListId");
301 });
302
303 modelBuilder.Entity("FarmatikoData.Models.MedicineList", b =>
304 {
305 b.HasOne("FarmatikoData.Models.Medicine", "Medicines")
306 .WithMany()
307 .HasForeignKey("MedicinesId");
308
309 b.HasOne("FarmatikoData.Models.PharmacyHead", null)
310 .WithMany("MedicineLists")
311 .HasForeignKey("PharmacyHeadId");
312 });
313
314 modelBuilder.Entity("FarmatikoData.Models.Pharmacy", b =>
315 {
316 b.HasOne("FarmatikoData.Models.PharmacyHead", null)
317 .WithMany("PharmaciesList")
318 .HasForeignKey("PharmacyHeadId");
319 });
320
321 modelBuilder.Entity("FarmatikoData.Models.PharmacyHead", b =>
322 {
323 b.HasOne("FarmatikoData.Models.Pharmacy", "Pharmacy")
324 .WithMany()
325 .HasForeignKey("PharmacyId");
326
327 b.HasOne("FarmatikoData.Models.MedicineList", "PharmacyMedicines")
328 .WithMany()
329 .HasForeignKey("PharmacyMedicinesId");
330 });
331#pragma warning restore 612, 618
332 }
333 }
334}
Note: See TracBrowser for help on using the repository browser.