[a8ccc2c] | 1 | // <auto-generated />
|
---|
| 2 | using System;
|
---|
| 3 | using FarmatikoData;
|
---|
| 4 | using Microsoft.EntityFrameworkCore;
|
---|
| 5 | using Microsoft.EntityFrameworkCore.Infrastructure;
|
---|
| 6 | using Microsoft.EntityFrameworkCore.Migrations;
|
---|
| 7 | using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
---|
| 8 | using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
---|
| 9 |
|
---|
| 10 | namespace FarmatikoData.Migrations
|
---|
| 11 | {
|
---|
| 12 | [DbContext(typeof(FarmatikoDataContext))]
|
---|
[8e74e2f] | 13 | [Migration("20201115222819_InitialMigration")]
|
---|
[d23bf72] | 14 | partial class InitialMigration
|
---|
[a8ccc2c] | 15 | {
|
---|
| 16 | protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
---|
| 17 | {
|
---|
| 18 | #pragma warning disable 612, 618
|
---|
| 19 | modelBuilder
|
---|
[8e74e2f] | 20 | .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn)
|
---|
| 21 | .HasAnnotation("ProductVersion", "3.1.10")
|
---|
[a8ccc2c] | 22 | .HasAnnotation("Relational:MaxIdentifierLength", 63);
|
---|
| 23 |
|
---|
[d23bf72] | 24 | modelBuilder.Entity("FarmatikoData.Models.HealthFacility", b =>
|
---|
[a8ccc2c] | 25 | {
|
---|
| 26 | b.Property<int>("Id")
|
---|
| 27 | .ValueGeneratedOnAdd()
|
---|
| 28 | .HasColumnType("integer")
|
---|
[8e74e2f] | 29 | .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
|
---|
[a8ccc2c] | 30 |
|
---|
| 31 | b.Property<string>("Address")
|
---|
| 32 | .IsRequired()
|
---|
| 33 | .HasColumnType("text");
|
---|
| 34 |
|
---|
| 35 | b.Property<DateTime>("CreatedOn")
|
---|
| 36 | .HasColumnType("timestamp without time zone");
|
---|
| 37 |
|
---|
[d23bf72] | 38 | b.Property<DateTime?>("DeletedOn")
|
---|
[a8ccc2c] | 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 |
|
---|
[d23bf72] | 64 | modelBuilder.Entity("FarmatikoData.Models.HealthcareWorker", b =>
|
---|
[a8ccc2c] | 65 | {
|
---|
| 66 | b.Property<int>("Id")
|
---|
| 67 | .ValueGeneratedOnAdd()
|
---|
| 68 | .HasColumnType("integer")
|
---|
[8e74e2f] | 69 | .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
|
---|
[a8ccc2c] | 70 |
|
---|
| 71 | b.Property<string>("Branch")
|
---|
| 72 | .IsRequired()
|
---|
| 73 | .HasColumnType("text");
|
---|
| 74 |
|
---|
| 75 | b.Property<DateTime>("CreatedOn")
|
---|
| 76 | .HasColumnType("timestamp without time zone");
|
---|
| 77 |
|
---|
[d23bf72] | 78 | b.Property<DateTime?>("DeletedOn")
|
---|
[a8ccc2c] | 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")
|
---|
[8e74e2f] | 103 | .HasAnnotation("Npgsql:IdentitySequenceOptions", "'1', '1', '', '', 'False', '1'")
|
---|
| 104 | .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
|
---|
[a8ccc2c] | 105 |
|
---|
| 106 | b.Property<DateTime>("CreatedOn")
|
---|
| 107 | .HasColumnType("timestamp without time zone");
|
---|
| 108 |
|
---|
[d23bf72] | 109 | b.Property<DateTime?>("DeletedOn")
|
---|
[a8ccc2c] | 110 | .HasColumnType("timestamp without time zone");
|
---|
| 111 |
|
---|
| 112 | b.Property<string>("Form")
|
---|
| 113 | .HasColumnType("text");
|
---|
| 114 |
|
---|
| 115 | b.Property<string>("Manufacturer")
|
---|
[d23bf72] | 116 | .IsRequired()
|
---|
[a8ccc2c] | 117 | .HasColumnType("text");
|
---|
| 118 |
|
---|
| 119 | b.Property<string>("Name")
|
---|
[d23bf72] | 120 | .IsRequired()
|
---|
[a8ccc2c] | 121 | .HasColumnType("text");
|
---|
| 122 |
|
---|
| 123 | b.Property<string>("Packaging")
|
---|
| 124 | .HasColumnType("text");
|
---|
| 125 |
|
---|
[1db5673] | 126 | b.Property<int?>("PharmacyHeadId")
|
---|
| 127 | .HasColumnType("integer");
|
---|
| 128 |
|
---|
[a8ccc2c] | 129 | b.Property<float>("Price")
|
---|
| 130 | .HasColumnType("real");
|
---|
| 131 |
|
---|
| 132 | b.Property<string>("Strength")
|
---|
[d23bf72] | 133 | .IsRequired()
|
---|
[a8ccc2c] | 134 | .HasColumnType("text");
|
---|
| 135 |
|
---|
| 136 | b.Property<string>("WayOfIssuing")
|
---|
[d23bf72] | 137 | .IsRequired()
|
---|
[a8ccc2c] | 138 | .HasColumnType("text");
|
---|
| 139 |
|
---|
| 140 | b.HasKey("Id");
|
---|
| 141 |
|
---|
| 142 | b.HasIndex("PharmacyHeadId");
|
---|
| 143 |
|
---|
[1db5673] | 144 | b.ToTable("Medicines");
|
---|
[a8ccc2c] | 145 | });
|
---|
| 146 |
|
---|
| 147 | modelBuilder.Entity("FarmatikoData.Models.Pandemic", b =>
|
---|
| 148 | {
|
---|
| 149 | b.Property<int>("Id")
|
---|
| 150 | .ValueGeneratedOnAdd()
|
---|
| 151 | .HasColumnType("integer")
|
---|
[8e74e2f] | 152 | .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
|
---|
[a8ccc2c] | 153 |
|
---|
[d23bf72] | 154 | b.Property<long>("ActiveGlobal")
|
---|
| 155 | .HasColumnType("bigint");
|
---|
[a8ccc2c] | 156 |
|
---|
| 157 | b.Property<int>("ActiveMK")
|
---|
| 158 | .HasColumnType("integer");
|
---|
| 159 |
|
---|
| 160 | b.Property<DateTime>("CreatedOn")
|
---|
| 161 | .HasColumnType("timestamp without time zone");
|
---|
| 162 |
|
---|
[d23bf72] | 163 | b.Property<long>("DeathsGlobal")
|
---|
| 164 | .HasColumnType("bigint");
|
---|
[a8ccc2c] | 165 |
|
---|
| 166 | b.Property<int>("DeathsMK")
|
---|
| 167 | .HasColumnType("integer");
|
---|
| 168 |
|
---|
[d23bf72] | 169 | b.Property<DateTime?>("DeletedOn")
|
---|
[a8ccc2c] | 170 | .HasColumnType("timestamp without time zone");
|
---|
| 171 |
|
---|
| 172 | b.Property<string>("Name")
|
---|
[d23bf72] | 173 | .IsRequired()
|
---|
[a8ccc2c] | 174 | .HasColumnType("text");
|
---|
| 175 |
|
---|
| 176 | b.Property<int>("NewMK")
|
---|
| 177 | .HasColumnType("integer");
|
---|
| 178 |
|
---|
[d23bf72] | 179 | b.Property<long>("TotalGlobal")
|
---|
| 180 | .HasColumnType("bigint");
|
---|
[a8ccc2c] | 181 |
|
---|
| 182 | b.Property<int>("TotalMK")
|
---|
| 183 | .HasColumnType("integer");
|
---|
| 184 |
|
---|
| 185 | b.HasKey("Id");
|
---|
| 186 |
|
---|
| 187 | b.ToTable("Pandemics");
|
---|
| 188 | });
|
---|
| 189 |
|
---|
| 190 | modelBuilder.Entity("FarmatikoData.Models.Pharmacy", b =>
|
---|
| 191 | {
|
---|
| 192 | b.Property<int>("Id")
|
---|
| 193 | .ValueGeneratedOnAdd()
|
---|
| 194 | .HasColumnType("integer")
|
---|
[8e74e2f] | 195 | .HasAnnotation("Npgsql:IdentitySequenceOptions", "'1', '1', '', '', 'False', '1'")
|
---|
| 196 | .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
|
---|
[a8ccc2c] | 197 |
|
---|
| 198 | b.Property<string>("Address")
|
---|
[d23bf72] | 199 | .IsRequired()
|
---|
[a8ccc2c] | 200 | .HasColumnType("text");
|
---|
| 201 |
|
---|
| 202 | b.Property<DateTime>("CreatedOn")
|
---|
| 203 | .HasColumnType("timestamp without time zone");
|
---|
| 204 |
|
---|
[d23bf72] | 205 | b.Property<DateTime?>("DeletedOn")
|
---|
[a8ccc2c] | 206 | .HasColumnType("timestamp without time zone");
|
---|
| 207 |
|
---|
| 208 | b.Property<string>("Location")
|
---|
[d23bf72] | 209 | .IsRequired()
|
---|
[a8ccc2c] | 210 | .HasColumnType("text");
|
---|
| 211 |
|
---|
| 212 | b.Property<string>("Name")
|
---|
[d23bf72] | 213 | .IsRequired()
|
---|
[a8ccc2c] | 214 | .HasColumnType("text");
|
---|
| 215 |
|
---|
[1db5673] | 216 | b.Property<int>("PheadId")
|
---|
[a8ccc2c] | 217 | .HasColumnType("integer");
|
---|
| 218 |
|
---|
| 219 | b.Property<bool>("WorkAllTime")
|
---|
| 220 | .HasColumnType("boolean");
|
---|
| 221 |
|
---|
| 222 | b.HasKey("Id");
|
---|
| 223 |
|
---|
[1db5673] | 224 | b.HasIndex("PheadId");
|
---|
[a8ccc2c] | 225 |
|
---|
| 226 | b.ToTable("Pharmacies");
|
---|
| 227 | });
|
---|
| 228 |
|
---|
| 229 | modelBuilder.Entity("FarmatikoData.Models.PharmacyHead", b =>
|
---|
| 230 | {
|
---|
| 231 | b.Property<int>("Id")
|
---|
| 232 | .ValueGeneratedOnAdd()
|
---|
| 233 | .HasColumnType("integer")
|
---|
[8e74e2f] | 234 | .HasAnnotation("Npgsql:IdentitySequenceOptions", "'1', '1', '', '', 'False', '1'")
|
---|
| 235 | .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
|
---|
[a8ccc2c] | 236 |
|
---|
| 237 | b.Property<DateTime>("CreatedOn")
|
---|
| 238 | .HasColumnType("timestamp without time zone");
|
---|
| 239 |
|
---|
[d23bf72] | 240 | b.Property<DateTime?>("DeletedOn")
|
---|
[a8ccc2c] | 241 | .HasColumnType("timestamp without time zone");
|
---|
| 242 |
|
---|
| 243 | b.Property<string>("Email")
|
---|
[d23bf72] | 244 | .IsRequired()
|
---|
[a8ccc2c] | 245 | .HasColumnType("text");
|
---|
| 246 |
|
---|
| 247 | b.Property<string>("Name")
|
---|
[d23bf72] | 248 | .IsRequired()
|
---|
[a8ccc2c] | 249 | .HasColumnType("text");
|
---|
| 250 |
|
---|
| 251 | b.Property<string>("Password")
|
---|
[d23bf72] | 252 | .IsRequired()
|
---|
[a8ccc2c] | 253 | .HasColumnType("text");
|
---|
| 254 |
|
---|
[d23bf72] | 255 | b.HasKey("Id");
|
---|
| 256 |
|
---|
| 257 | b.ToTable("PharmacyHeads");
|
---|
| 258 | });
|
---|
| 259 |
|
---|
[1db5673] | 260 | modelBuilder.Entity("FarmatikoData.Models.PharmacyHeadMedicine", b =>
|
---|
| 261 | {
|
---|
| 262 | b.Property<int>("PheadId")
|
---|
| 263 | .HasColumnType("integer");
|
---|
| 264 |
|
---|
| 265 | b.Property<int>("MedicineId")
|
---|
| 266 | .HasColumnType("integer");
|
---|
| 267 |
|
---|
| 268 | b.Property<DateTime>("CreatedOn")
|
---|
| 269 | .HasColumnType("timestamp without time zone");
|
---|
| 270 |
|
---|
| 271 | b.Property<DateTime?>("DeletedOn")
|
---|
| 272 | .HasColumnType("timestamp without time zone");
|
---|
| 273 |
|
---|
| 274 | b.Property<int>("Id")
|
---|
[8e74e2f] | 275 | .HasColumnType("integer")
|
---|
| 276 | .HasAnnotation("Npgsql:IdentitySequenceOptions", "'1', '1', '', '', 'False', '1'");
|
---|
[1db5673] | 277 |
|
---|
| 278 | b.HasKey("PheadId", "MedicineId");
|
---|
| 279 |
|
---|
| 280 | b.HasIndex("MedicineId");
|
---|
| 281 |
|
---|
| 282 | b.ToTable("PharmacyHeadMedicines");
|
---|
| 283 | });
|
---|
| 284 |
|
---|
[d23bf72] | 285 | modelBuilder.Entity("FarmatikoData.Models.RequestPharmacyHead", b =>
|
---|
| 286 | {
|
---|
| 287 | b.Property<int>("Id")
|
---|
| 288 | .ValueGeneratedOnAdd()
|
---|
| 289 | .HasColumnType("integer")
|
---|
[8e74e2f] | 290 | .HasAnnotation("Npgsql:IdentitySequenceOptions", "'1', '1', '', '', 'False', '1'")
|
---|
| 291 | .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
|
---|
[d23bf72] | 292 |
|
---|
| 293 | b.Property<DateTime>("CreatedOn")
|
---|
| 294 | .HasColumnType("timestamp without time zone");
|
---|
| 295 |
|
---|
| 296 | b.Property<DateTime?>("DeletedOn")
|
---|
| 297 | .HasColumnType("timestamp without time zone");
|
---|
| 298 |
|
---|
| 299 | b.Property<int>("HeadId")
|
---|
[a8ccc2c] | 300 | .HasColumnType("integer");
|
---|
| 301 |
|
---|
[d23bf72] | 302 | b.Property<int>("PharmacyId")
|
---|
[a8ccc2c] | 303 | .HasColumnType("integer");
|
---|
| 304 |
|
---|
| 305 | b.HasKey("Id");
|
---|
| 306 |
|
---|
[d23bf72] | 307 | b.HasIndex("HeadId");
|
---|
| 308 |
|
---|
[a8ccc2c] | 309 | b.HasIndex("PharmacyId");
|
---|
| 310 |
|
---|
[d23bf72] | 311 | b.ToTable("PHRequests");
|
---|
| 312 | });
|
---|
[a8ccc2c] | 313 |
|
---|
[d23bf72] | 314 | modelBuilder.Entity("FarmatikoData.Models.User", b =>
|
---|
| 315 | {
|
---|
| 316 | b.Property<int>("Id")
|
---|
| 317 | .ValueGeneratedOnAdd()
|
---|
| 318 | .HasColumnType("integer")
|
---|
[8e74e2f] | 319 | .HasAnnotation("Npgsql:IdentitySequenceOptions", "'1', '1', '', '', 'False', '1'")
|
---|
| 320 | .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
|
---|
[d23bf72] | 321 |
|
---|
| 322 | b.Property<DateTime>("CreatedOn")
|
---|
| 323 | .HasColumnType("timestamp without time zone");
|
---|
| 324 |
|
---|
| 325 | b.Property<DateTime?>("DeletedOn")
|
---|
| 326 | .HasColumnType("timestamp without time zone");
|
---|
| 327 |
|
---|
| 328 | b.Property<string>("Email")
|
---|
[8e74e2f] | 329 | .IsRequired()
|
---|
[d23bf72] | 330 | .HasColumnType("text");
|
---|
| 331 |
|
---|
| 332 | b.Property<string>("Name")
|
---|
[8e74e2f] | 333 | .IsRequired()
|
---|
[d23bf72] | 334 | .HasColumnType("text");
|
---|
| 335 |
|
---|
| 336 | b.Property<string>("Password")
|
---|
[8e74e2f] | 337 | .IsRequired()
|
---|
[d23bf72] | 338 | .HasColumnType("text");
|
---|
| 339 |
|
---|
| 340 | b.Property<int>("UserRole")
|
---|
| 341 | .HasColumnType("integer");
|
---|
| 342 |
|
---|
| 343 | b.HasKey("Id");
|
---|
| 344 |
|
---|
| 345 | b.ToTable("Users");
|
---|
[a8ccc2c] | 346 | });
|
---|
| 347 |
|
---|
[d23bf72] | 348 | modelBuilder.Entity("FarmatikoData.Models.HealthcareWorker", b =>
|
---|
[a8ccc2c] | 349 | {
|
---|
[d23bf72] | 350 | b.HasOne("FarmatikoData.Models.HealthFacility", "Facility")
|
---|
[a8ccc2c] | 351 | .WithMany()
|
---|
| 352 | .HasForeignKey("FacilityId")
|
---|
| 353 | .OnDelete(DeleteBehavior.Cascade)
|
---|
| 354 | .IsRequired();
|
---|
| 355 | });
|
---|
| 356 |
|
---|
[1db5673] | 357 | modelBuilder.Entity("FarmatikoData.Models.Medicine", b =>
|
---|
[a8ccc2c] | 358 | {
|
---|
| 359 | b.HasOne("FarmatikoData.Models.PharmacyHead", null)
|
---|
[1db5673] | 360 | .WithMany("MedicineList")
|
---|
[a8ccc2c] | 361 | .HasForeignKey("PharmacyHeadId");
|
---|
| 362 | });
|
---|
| 363 |
|
---|
| 364 | modelBuilder.Entity("FarmatikoData.Models.Pharmacy", b =>
|
---|
| 365 | {
|
---|
[1db5673] | 366 | b.HasOne("FarmatikoData.Models.PharmacyHead", "PHead")
|
---|
[a8ccc2c] | 367 | .WithMany("PharmaciesList")
|
---|
[1db5673] | 368 | .HasForeignKey("PheadId")
|
---|
| 369 | .OnDelete(DeleteBehavior.Cascade)
|
---|
| 370 | .IsRequired();
|
---|
| 371 | });
|
---|
| 372 |
|
---|
| 373 | modelBuilder.Entity("FarmatikoData.Models.PharmacyHeadMedicine", b =>
|
---|
| 374 | {
|
---|
| 375 | b.HasOne("FarmatikoData.Models.Medicine", "Medicine")
|
---|
| 376 | .WithMany("MedicineList")
|
---|
| 377 | .HasForeignKey("MedicineId")
|
---|
| 378 | .OnDelete(DeleteBehavior.Cascade)
|
---|
| 379 | .IsRequired();
|
---|
| 380 |
|
---|
| 381 | b.HasOne("FarmatikoData.Models.PharmacyHead", "Head")
|
---|
| 382 | .WithMany("PHMedicineList")
|
---|
| 383 | .HasForeignKey("PheadId")
|
---|
| 384 | .OnDelete(DeleteBehavior.Cascade)
|
---|
| 385 | .IsRequired();
|
---|
[a8ccc2c] | 386 | });
|
---|
| 387 |
|
---|
[d23bf72] | 388 | modelBuilder.Entity("FarmatikoData.Models.RequestPharmacyHead", b =>
|
---|
[a8ccc2c] | 389 | {
|
---|
[d23bf72] | 390 | b.HasOne("FarmatikoData.Models.PharmacyHead", "Head")
|
---|
[a8ccc2c] | 391 | .WithMany()
|
---|
[d23bf72] | 392 | .HasForeignKey("HeadId")
|
---|
| 393 | .OnDelete(DeleteBehavior.Cascade)
|
---|
| 394 | .IsRequired();
|
---|
[a8ccc2c] | 395 |
|
---|
[d23bf72] | 396 | b.HasOne("FarmatikoData.Models.Pharmacy", "Pharmacy")
|
---|
[a8ccc2c] | 397 | .WithMany()
|
---|
[d23bf72] | 398 | .HasForeignKey("PharmacyId")
|
---|
| 399 | .OnDelete(DeleteBehavior.Cascade)
|
---|
| 400 | .IsRequired();
|
---|
[a8ccc2c] | 401 | });
|
---|
| 402 | #pragma warning restore 612, 618
|
---|
| 403 | }
|
---|
| 404 | }
|
---|
| 405 | }
|
---|