[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))]
|
---|
[db484c9] | 13 | [Migration("20210124191844_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 |
|
---|
| 126 | b.Property<float>("Price")
|
---|
| 127 | .HasColumnType("real");
|
---|
| 128 |
|
---|
| 129 | b.Property<string>("Strength")
|
---|
[d23bf72] | 130 | .IsRequired()
|
---|
[a8ccc2c] | 131 | .HasColumnType("text");
|
---|
| 132 |
|
---|
| 133 | b.Property<string>("WayOfIssuing")
|
---|
[d23bf72] | 134 | .IsRequired()
|
---|
[a8ccc2c] | 135 | .HasColumnType("text");
|
---|
| 136 |
|
---|
| 137 | b.HasKey("Id");
|
---|
| 138 |
|
---|
[1db5673] | 139 | b.ToTable("Medicines");
|
---|
[a8ccc2c] | 140 | });
|
---|
| 141 |
|
---|
| 142 | modelBuilder.Entity("FarmatikoData.Models.Pandemic", b =>
|
---|
| 143 | {
|
---|
| 144 | b.Property<int>("Id")
|
---|
| 145 | .ValueGeneratedOnAdd()
|
---|
| 146 | .HasColumnType("integer")
|
---|
[8e74e2f] | 147 | .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
|
---|
[a8ccc2c] | 148 |
|
---|
[d23bf72] | 149 | b.Property<long>("ActiveGlobal")
|
---|
| 150 | .HasColumnType("bigint");
|
---|
[a8ccc2c] | 151 |
|
---|
| 152 | b.Property<int>("ActiveMK")
|
---|
| 153 | .HasColumnType("integer");
|
---|
| 154 |
|
---|
| 155 | b.Property<DateTime>("CreatedOn")
|
---|
| 156 | .HasColumnType("timestamp without time zone");
|
---|
| 157 |
|
---|
[d23bf72] | 158 | b.Property<long>("DeathsGlobal")
|
---|
| 159 | .HasColumnType("bigint");
|
---|
[a8ccc2c] | 160 |
|
---|
| 161 | b.Property<int>("DeathsMK")
|
---|
| 162 | .HasColumnType("integer");
|
---|
| 163 |
|
---|
[d23bf72] | 164 | b.Property<DateTime?>("DeletedOn")
|
---|
[a8ccc2c] | 165 | .HasColumnType("timestamp without time zone");
|
---|
| 166 |
|
---|
| 167 | b.Property<string>("Name")
|
---|
[d23bf72] | 168 | .IsRequired()
|
---|
[a8ccc2c] | 169 | .HasColumnType("text");
|
---|
| 170 |
|
---|
| 171 | b.Property<int>("NewMK")
|
---|
| 172 | .HasColumnType("integer");
|
---|
| 173 |
|
---|
[d23bf72] | 174 | b.Property<long>("TotalGlobal")
|
---|
| 175 | .HasColumnType("bigint");
|
---|
[a8ccc2c] | 176 |
|
---|
| 177 | b.Property<int>("TotalMK")
|
---|
| 178 | .HasColumnType("integer");
|
---|
| 179 |
|
---|
| 180 | b.HasKey("Id");
|
---|
| 181 |
|
---|
| 182 | b.ToTable("Pandemics");
|
---|
| 183 | });
|
---|
| 184 |
|
---|
| 185 | modelBuilder.Entity("FarmatikoData.Models.Pharmacy", b =>
|
---|
| 186 | {
|
---|
| 187 | b.Property<int>("Id")
|
---|
| 188 | .ValueGeneratedOnAdd()
|
---|
| 189 | .HasColumnType("integer")
|
---|
[8e74e2f] | 190 | .HasAnnotation("Npgsql:IdentitySequenceOptions", "'1', '1', '', '', 'False', '1'")
|
---|
| 191 | .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
|
---|
[a8ccc2c] | 192 |
|
---|
| 193 | b.Property<string>("Address")
|
---|
[d23bf72] | 194 | .IsRequired()
|
---|
[a8ccc2c] | 195 | .HasColumnType("text");
|
---|
| 196 |
|
---|
| 197 | b.Property<DateTime>("CreatedOn")
|
---|
| 198 | .HasColumnType("timestamp without time zone");
|
---|
| 199 |
|
---|
[d23bf72] | 200 | b.Property<DateTime?>("DeletedOn")
|
---|
[a8ccc2c] | 201 | .HasColumnType("timestamp without time zone");
|
---|
| 202 |
|
---|
| 203 | b.Property<string>("Location")
|
---|
[d23bf72] | 204 | .IsRequired()
|
---|
[a8ccc2c] | 205 | .HasColumnType("text");
|
---|
| 206 |
|
---|
| 207 | b.Property<string>("Name")
|
---|
[d23bf72] | 208 | .IsRequired()
|
---|
[a8ccc2c] | 209 | .HasColumnType("text");
|
---|
| 210 |
|
---|
[db484c9] | 211 | b.Property<int?>("PharmacyHeadId")
|
---|
| 212 | .HasColumnType("integer");
|
---|
| 213 |
|
---|
[1db5673] | 214 | b.Property<int>("PheadId")
|
---|
[a8ccc2c] | 215 | .HasColumnType("integer");
|
---|
| 216 |
|
---|
| 217 | b.Property<bool>("WorkAllTime")
|
---|
| 218 | .HasColumnType("boolean");
|
---|
| 219 |
|
---|
| 220 | b.HasKey("Id");
|
---|
| 221 |
|
---|
[db484c9] | 222 | b.HasIndex("PharmacyHeadId");
|
---|
[a8ccc2c] | 223 |
|
---|
| 224 | b.ToTable("Pharmacies");
|
---|
| 225 | });
|
---|
| 226 |
|
---|
| 227 | modelBuilder.Entity("FarmatikoData.Models.PharmacyHead", b =>
|
---|
| 228 | {
|
---|
| 229 | b.Property<int>("Id")
|
---|
| 230 | .ValueGeneratedOnAdd()
|
---|
| 231 | .HasColumnType("integer")
|
---|
[8e74e2f] | 232 | .HasAnnotation("Npgsql:IdentitySequenceOptions", "'1', '1', '', '', 'False', '1'")
|
---|
| 233 | .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
|
---|
[a8ccc2c] | 234 |
|
---|
| 235 | b.Property<DateTime>("CreatedOn")
|
---|
| 236 | .HasColumnType("timestamp without time zone");
|
---|
| 237 |
|
---|
[d23bf72] | 238 | b.Property<DateTime?>("DeletedOn")
|
---|
[a8ccc2c] | 239 | .HasColumnType("timestamp without time zone");
|
---|
| 240 |
|
---|
| 241 | b.Property<string>("Email")
|
---|
[d23bf72] | 242 | .IsRequired()
|
---|
[a8ccc2c] | 243 | .HasColumnType("text");
|
---|
| 244 |
|
---|
| 245 | b.Property<string>("Name")
|
---|
[d23bf72] | 246 | .IsRequired()
|
---|
[a8ccc2c] | 247 | .HasColumnType("text");
|
---|
| 248 |
|
---|
| 249 | b.Property<string>("Password")
|
---|
[d23bf72] | 250 | .IsRequired()
|
---|
[a8ccc2c] | 251 | .HasColumnType("text");
|
---|
| 252 |
|
---|
[db484c9] | 253 | b.Property<int?>("UserId")
|
---|
| 254 | .HasColumnType("integer");
|
---|
| 255 |
|
---|
[d23bf72] | 256 | b.HasKey("Id");
|
---|
| 257 |
|
---|
[db484c9] | 258 | b.HasIndex("UserId");
|
---|
| 259 |
|
---|
[d23bf72] | 260 | b.ToTable("PharmacyHeads");
|
---|
| 261 | });
|
---|
| 262 |
|
---|
[1db5673] | 263 | modelBuilder.Entity("FarmatikoData.Models.PharmacyHeadMedicine", b =>
|
---|
| 264 | {
|
---|
[db484c9] | 265 | b.Property<int>("Id")
|
---|
| 266 | .ValueGeneratedOnAdd()
|
---|
| 267 | .HasColumnType("integer")
|
---|
| 268 | .HasAnnotation("Npgsql:IdentitySequenceOptions", "'1', '1', '', '', 'False', '1'")
|
---|
| 269 | .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
|
---|
[1db5673] | 270 |
|
---|
| 271 | b.Property<DateTime>("CreatedOn")
|
---|
| 272 | .HasColumnType("timestamp without time zone");
|
---|
| 273 |
|
---|
| 274 | b.Property<DateTime?>("DeletedOn")
|
---|
| 275 | .HasColumnType("timestamp without time zone");
|
---|
| 276 |
|
---|
[db484c9] | 277 | b.Property<int?>("HeadId")
|
---|
| 278 | .HasColumnType("integer");
|
---|
| 279 |
|
---|
| 280 | b.Property<int>("MedicineId")
|
---|
| 281 | .HasColumnType("integer");
|
---|
| 282 |
|
---|
| 283 | b.Property<int>("PheadId")
|
---|
| 284 | .HasColumnType("integer");
|
---|
| 285 |
|
---|
| 286 | b.HasKey("Id");
|
---|
[1db5673] | 287 |
|
---|
[db484c9] | 288 | b.HasIndex("HeadId");
|
---|
[1db5673] | 289 |
|
---|
| 290 | b.HasIndex("MedicineId");
|
---|
| 291 |
|
---|
| 292 | b.ToTable("PharmacyHeadMedicines");
|
---|
| 293 | });
|
---|
| 294 |
|
---|
[d23bf72] | 295 | modelBuilder.Entity("FarmatikoData.Models.RequestPharmacyHead", b =>
|
---|
| 296 | {
|
---|
| 297 | b.Property<int>("Id")
|
---|
| 298 | .ValueGeneratedOnAdd()
|
---|
| 299 | .HasColumnType("integer")
|
---|
[8e74e2f] | 300 | .HasAnnotation("Npgsql:IdentitySequenceOptions", "'1', '1', '', '', 'False', '1'")
|
---|
| 301 | .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
|
---|
[d23bf72] | 302 |
|
---|
| 303 | b.Property<DateTime>("CreatedOn")
|
---|
| 304 | .HasColumnType("timestamp without time zone");
|
---|
| 305 |
|
---|
| 306 | b.Property<DateTime?>("DeletedOn")
|
---|
| 307 | .HasColumnType("timestamp without time zone");
|
---|
| 308 |
|
---|
| 309 | b.Property<int>("HeadId")
|
---|
[a8ccc2c] | 310 | .HasColumnType("integer");
|
---|
| 311 |
|
---|
[d23bf72] | 312 | b.Property<int>("PharmacyId")
|
---|
[a8ccc2c] | 313 | .HasColumnType("integer");
|
---|
| 314 |
|
---|
| 315 | b.HasKey("Id");
|
---|
| 316 |
|
---|
[d23bf72] | 317 | b.HasIndex("HeadId");
|
---|
| 318 |
|
---|
[a8ccc2c] | 319 | b.HasIndex("PharmacyId");
|
---|
| 320 |
|
---|
[d23bf72] | 321 | b.ToTable("PHRequests");
|
---|
| 322 | });
|
---|
[a8ccc2c] | 323 |
|
---|
[d23bf72] | 324 | modelBuilder.Entity("FarmatikoData.Models.User", b =>
|
---|
| 325 | {
|
---|
| 326 | b.Property<int>("Id")
|
---|
| 327 | .ValueGeneratedOnAdd()
|
---|
| 328 | .HasColumnType("integer")
|
---|
[8e74e2f] | 329 | .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
|
---|
[d23bf72] | 330 |
|
---|
| 331 | b.Property<DateTime>("CreatedOn")
|
---|
| 332 | .HasColumnType("timestamp without time zone");
|
---|
| 333 |
|
---|
| 334 | b.Property<DateTime?>("DeletedOn")
|
---|
| 335 | .HasColumnType("timestamp without time zone");
|
---|
| 336 |
|
---|
| 337 | b.Property<string>("Email")
|
---|
[8e74e2f] | 338 | .IsRequired()
|
---|
[d23bf72] | 339 | .HasColumnType("text");
|
---|
| 340 |
|
---|
| 341 | b.Property<string>("Name")
|
---|
[8e74e2f] | 342 | .IsRequired()
|
---|
[d23bf72] | 343 | .HasColumnType("text");
|
---|
| 344 |
|
---|
| 345 | b.Property<string>("Password")
|
---|
[8e74e2f] | 346 | .IsRequired()
|
---|
[d23bf72] | 347 | .HasColumnType("text");
|
---|
| 348 |
|
---|
| 349 | b.Property<int>("UserRole")
|
---|
| 350 | .HasColumnType("integer");
|
---|
| 351 |
|
---|
| 352 | b.HasKey("Id");
|
---|
| 353 |
|
---|
| 354 | b.ToTable("Users");
|
---|
[a8ccc2c] | 355 | });
|
---|
| 356 |
|
---|
[d23bf72] | 357 | modelBuilder.Entity("FarmatikoData.Models.HealthcareWorker", b =>
|
---|
[a8ccc2c] | 358 | {
|
---|
[d23bf72] | 359 | b.HasOne("FarmatikoData.Models.HealthFacility", "Facility")
|
---|
[a8ccc2c] | 360 | .WithMany()
|
---|
| 361 | .HasForeignKey("FacilityId")
|
---|
| 362 | .OnDelete(DeleteBehavior.Cascade)
|
---|
| 363 | .IsRequired();
|
---|
| 364 | });
|
---|
| 365 |
|
---|
[db484c9] | 366 | modelBuilder.Entity("FarmatikoData.Models.Pharmacy", b =>
|
---|
[a8ccc2c] | 367 | {
|
---|
[db484c9] | 368 | b.HasOne("FarmatikoData.Models.PharmacyHead", "PharmacyHead")
|
---|
| 369 | .WithMany("Pharmacies")
|
---|
[a8ccc2c] | 370 | .HasForeignKey("PharmacyHeadId");
|
---|
| 371 | });
|
---|
| 372 |
|
---|
[db484c9] | 373 | modelBuilder.Entity("FarmatikoData.Models.PharmacyHead", b =>
|
---|
[a8ccc2c] | 374 | {
|
---|
[db484c9] | 375 | b.HasOne("FarmatikoData.Models.User", "User")
|
---|
| 376 | .WithMany()
|
---|
| 377 | .HasForeignKey("UserId");
|
---|
[1db5673] | 378 | });
|
---|
| 379 |
|
---|
| 380 | modelBuilder.Entity("FarmatikoData.Models.PharmacyHeadMedicine", b =>
|
---|
| 381 | {
|
---|
[db484c9] | 382 | b.HasOne("FarmatikoData.Models.PharmacyHead", "Head")
|
---|
| 383 | .WithMany("Medicines")
|
---|
| 384 | .HasForeignKey("HeadId");
|
---|
| 385 |
|
---|
[1db5673] | 386 | b.HasOne("FarmatikoData.Models.Medicine", "Medicine")
|
---|
[db484c9] | 387 | .WithMany("Medicines")
|
---|
[1db5673] | 388 | .HasForeignKey("MedicineId")
|
---|
| 389 | .OnDelete(DeleteBehavior.Cascade)
|
---|
| 390 | .IsRequired();
|
---|
[a8ccc2c] | 391 | });
|
---|
| 392 |
|
---|
[d23bf72] | 393 | modelBuilder.Entity("FarmatikoData.Models.RequestPharmacyHead", b =>
|
---|
[a8ccc2c] | 394 | {
|
---|
[d23bf72] | 395 | b.HasOne("FarmatikoData.Models.PharmacyHead", "Head")
|
---|
[a8ccc2c] | 396 | .WithMany()
|
---|
[d23bf72] | 397 | .HasForeignKey("HeadId")
|
---|
| 398 | .OnDelete(DeleteBehavior.Cascade)
|
---|
| 399 | .IsRequired();
|
---|
[a8ccc2c] | 400 |
|
---|
[d23bf72] | 401 | b.HasOne("FarmatikoData.Models.Pharmacy", "Pharmacy")
|
---|
[a8ccc2c] | 402 | .WithMany()
|
---|
[d23bf72] | 403 | .HasForeignKey("PharmacyId")
|
---|
| 404 | .OnDelete(DeleteBehavior.Cascade)
|
---|
| 405 | .IsRequired();
|
---|
[a8ccc2c] | 406 | });
|
---|
| 407 | #pragma warning restore 612, 618
|
---|
| 408 | }
|
---|
| 409 | }
|
---|
| 410 | }
|
---|