source: FarmatikoData/Migrations/20200720165322_Initial Migration.Designer.cs@ f33b0d4

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

Add migration and DeletedOn property

  • Property mode set to 100644
File size: 12.2 KB
RevLine 
[f33b0d4]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("20200720165322_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?>("MedicineId")
159 .HasColumnType("integer");
160
161 b.Property<int?>("PharmacyHeadId")
162 .HasColumnType("integer");
163
164 b.HasKey("Id");
165
166 b.HasIndex("MedicineId");
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 .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 .HasColumnType("text");
268
269 b.Property<string>("Name")
270 .HasColumnType("text");
271
272 b.Property<string>("Password")
273 .HasColumnType("text");
274
275 b.Property<int?>("PharmacyId")
276 .HasColumnType("integer");
277
278 b.Property<int?>("PharmacyMedicinesId")
279 .HasColumnType("integer");
280
281 b.HasKey("Id");
282
283 b.HasIndex("PharmacyId");
284
285 b.HasIndex("PharmacyMedicinesId");
286
287 b.ToTable("PharmacyHeads");
288 });
289
290 modelBuilder.Entity("FarmatikoData.Models.HealthcareWorkers", b =>
291 {
292 b.HasOne("FarmatikoData.Models.HealthFacilities", "Facility")
293 .WithMany()
294 .HasForeignKey("FacilityId")
295 .OnDelete(DeleteBehavior.Cascade)
296 .IsRequired();
297 });
298
299 modelBuilder.Entity("FarmatikoData.Models.Medicine", b =>
300 {
301 b.HasOne("FarmatikoData.Models.MedicineList", null)
302 .WithMany("MedicinesList")
303 .HasForeignKey("MedicineListId");
304 });
305
306 modelBuilder.Entity("FarmatikoData.Models.MedicineList", b =>
307 {
308 b.HasOne("FarmatikoData.Models.Medicine", "Medicine")
309 .WithMany()
310 .HasForeignKey("MedicineId");
311
312 b.HasOne("FarmatikoData.Models.PharmacyHead", null)
313 .WithMany("MedicineLists")
314 .HasForeignKey("PharmacyHeadId");
315 });
316
317 modelBuilder.Entity("FarmatikoData.Models.Pharmacy", b =>
318 {
319 b.HasOne("FarmatikoData.Models.PharmacyHead", null)
320 .WithMany("PharmaciesList")
321 .HasForeignKey("PharmacyHeadId");
322 });
323
324 modelBuilder.Entity("FarmatikoData.Models.PharmacyHead", b =>
325 {
326 b.HasOne("FarmatikoData.Models.Pharmacy", "Pharmacy")
327 .WithMany()
328 .HasForeignKey("PharmacyId");
329
330 b.HasOne("FarmatikoData.Models.MedicineList", "PharmacyMedicines")
331 .WithMany()
332 .HasForeignKey("PharmacyMedicinesId");
333 });
334#pragma warning restore 612, 618
335 }
336 }
337}
Note: See TracBrowser for help on using the repository browser.