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