[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))]
|
---|
[e0cdea2] | 13 | [Migration("20210208041424_Initial-Create")]
|
---|
| 14 | partial class InitialCreate
|
---|
[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 |
|
---|
[e0cdea2] | 209 | b.Property<int?>("PheadId")
|
---|
[a8ccc2c] | 210 | .HasColumnType("integer");
|
---|
| 211 |
|
---|
| 212 | b.Property<bool>("WorkAllTime")
|
---|
| 213 | .HasColumnType("boolean");
|
---|
| 214 |
|
---|
| 215 | b.HasKey("Id");
|
---|
| 216 |
|
---|
[e0cdea2] | 217 | b.HasIndex("PheadId");
|
---|
[a8ccc2c] | 218 |
|
---|
| 219 | b.ToTable("Pharmacies");
|
---|
| 220 | });
|
---|
| 221 |
|
---|
| 222 | modelBuilder.Entity("FarmatikoData.Models.PharmacyHead", b =>
|
---|
| 223 | {
|
---|
| 224 | b.Property<int>("Id")
|
---|
| 225 | .ValueGeneratedOnAdd()
|
---|
| 226 | .HasColumnType("integer")
|
---|
[8e74e2f] | 227 | .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
|
---|
[a8ccc2c] | 228 |
|
---|
| 229 | b.Property<DateTime>("CreatedOn")
|
---|
| 230 | .HasColumnType("timestamp without time zone");
|
---|
| 231 |
|
---|
[d23bf72] | 232 | b.Property<DateTime?>("DeletedOn")
|
---|
[a8ccc2c] | 233 | .HasColumnType("timestamp without time zone");
|
---|
| 234 |
|
---|
| 235 | b.Property<string>("Email")
|
---|
[d23bf72] | 236 | .IsRequired()
|
---|
[a8ccc2c] | 237 | .HasColumnType("text");
|
---|
| 238 |
|
---|
| 239 | b.Property<string>("Name")
|
---|
[d23bf72] | 240 | .IsRequired()
|
---|
[a8ccc2c] | 241 | .HasColumnType("text");
|
---|
| 242 |
|
---|
| 243 | b.Property<string>("Password")
|
---|
[d23bf72] | 244 | .IsRequired()
|
---|
[a8ccc2c] | 245 | .HasColumnType("text");
|
---|
| 246 |
|
---|
[0a694bb] | 247 | b.Property<int>("UserID")
|
---|
[db484c9] | 248 | .HasColumnType("integer");
|
---|
| 249 |
|
---|
[d23bf72] | 250 | b.HasKey("Id");
|
---|
| 251 |
|
---|
[0a694bb] | 252 | b.HasIndex("UserID");
|
---|
[db484c9] | 253 |
|
---|
[d23bf72] | 254 | b.ToTable("PharmacyHeads");
|
---|
| 255 | });
|
---|
| 256 |
|
---|
[1db5673] | 257 | modelBuilder.Entity("FarmatikoData.Models.PharmacyHeadMedicine", b =>
|
---|
| 258 | {
|
---|
[db484c9] | 259 | b.Property<int>("Id")
|
---|
| 260 | .ValueGeneratedOnAdd()
|
---|
| 261 | .HasColumnType("integer")
|
---|
| 262 | .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
|
---|
[1db5673] | 263 |
|
---|
| 264 | b.Property<DateTime>("CreatedOn")
|
---|
| 265 | .HasColumnType("timestamp without time zone");
|
---|
| 266 |
|
---|
| 267 | b.Property<DateTime?>("DeletedOn")
|
---|
| 268 | .HasColumnType("timestamp without time zone");
|
---|
| 269 |
|
---|
[db484c9] | 270 | b.Property<int?>("HeadId")
|
---|
| 271 | .HasColumnType("integer");
|
---|
| 272 |
|
---|
| 273 | b.Property<int>("MedicineId")
|
---|
| 274 | .HasColumnType("integer");
|
---|
| 275 |
|
---|
| 276 | b.Property<int>("PheadId")
|
---|
| 277 | .HasColumnType("integer");
|
---|
| 278 |
|
---|
| 279 | b.HasKey("Id");
|
---|
[1db5673] | 280 |
|
---|
[db484c9] | 281 | b.HasIndex("HeadId");
|
---|
[1db5673] | 282 |
|
---|
| 283 | b.HasIndex("MedicineId");
|
---|
| 284 |
|
---|
| 285 | b.ToTable("PharmacyHeadMedicines");
|
---|
| 286 | });
|
---|
| 287 |
|
---|
[d23bf72] | 288 | modelBuilder.Entity("FarmatikoData.Models.RequestPharmacyHead", b =>
|
---|
| 289 | {
|
---|
| 290 | b.Property<int>("Id")
|
---|
| 291 | .ValueGeneratedOnAdd()
|
---|
| 292 | .HasColumnType("integer")
|
---|
[8e74e2f] | 293 | .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
|
---|
[d23bf72] | 294 |
|
---|
| 295 | b.Property<DateTime>("CreatedOn")
|
---|
| 296 | .HasColumnType("timestamp without time zone");
|
---|
| 297 |
|
---|
| 298 | b.Property<DateTime?>("DeletedOn")
|
---|
| 299 | .HasColumnType("timestamp without time zone");
|
---|
| 300 |
|
---|
[e0cdea2] | 301 | b.Property<int?>("HeadId")
|
---|
[a8ccc2c] | 302 | .HasColumnType("integer");
|
---|
| 303 |
|
---|
[e0cdea2] | 304 | b.Property<int?>("PharmacyId")
|
---|
[a8ccc2c] | 305 | .HasColumnType("integer");
|
---|
| 306 |
|
---|
| 307 | b.HasKey("Id");
|
---|
| 308 |
|
---|
[d23bf72] | 309 | b.HasIndex("HeadId");
|
---|
| 310 |
|
---|
[a8ccc2c] | 311 | b.HasIndex("PharmacyId");
|
---|
| 312 |
|
---|
[d23bf72] | 313 | b.ToTable("PHRequests");
|
---|
| 314 | });
|
---|
[a8ccc2c] | 315 |
|
---|
[d23bf72] | 316 | modelBuilder.Entity("FarmatikoData.Models.User", b =>
|
---|
| 317 | {
|
---|
| 318 | b.Property<int>("Id")
|
---|
| 319 | .ValueGeneratedOnAdd()
|
---|
| 320 | .HasColumnType("integer")
|
---|
[8e74e2f] | 321 | .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
|
---|
[d23bf72] | 322 |
|
---|
| 323 | b.Property<DateTime>("CreatedOn")
|
---|
| 324 | .HasColumnType("timestamp without time zone");
|
---|
| 325 |
|
---|
| 326 | b.Property<DateTime?>("DeletedOn")
|
---|
| 327 | .HasColumnType("timestamp without time zone");
|
---|
| 328 |
|
---|
| 329 | b.Property<string>("Email")
|
---|
[8e74e2f] | 330 | .IsRequired()
|
---|
[d23bf72] | 331 | .HasColumnType("text");
|
---|
| 332 |
|
---|
| 333 | b.Property<string>("Name")
|
---|
[8e74e2f] | 334 | .IsRequired()
|
---|
[d23bf72] | 335 | .HasColumnType("text");
|
---|
| 336 |
|
---|
| 337 | b.Property<string>("Password")
|
---|
[8e74e2f] | 338 | .IsRequired()
|
---|
[d23bf72] | 339 | .HasColumnType("text");
|
---|
| 340 |
|
---|
| 341 | b.Property<int>("UserRole")
|
---|
| 342 | .HasColumnType("integer");
|
---|
| 343 |
|
---|
| 344 | b.HasKey("Id");
|
---|
| 345 |
|
---|
| 346 | b.ToTable("Users");
|
---|
[a8ccc2c] | 347 | });
|
---|
| 348 |
|
---|
[d23bf72] | 349 | modelBuilder.Entity("FarmatikoData.Models.HealthcareWorker", b =>
|
---|
[a8ccc2c] | 350 | {
|
---|
[d23bf72] | 351 | b.HasOne("FarmatikoData.Models.HealthFacility", "Facility")
|
---|
[a8ccc2c] | 352 | .WithMany()
|
---|
| 353 | .HasForeignKey("FacilityId")
|
---|
| 354 | .OnDelete(DeleteBehavior.Cascade)
|
---|
| 355 | .IsRequired();
|
---|
| 356 | });
|
---|
| 357 |
|
---|
[db484c9] | 358 | modelBuilder.Entity("FarmatikoData.Models.Pharmacy", b =>
|
---|
[a8ccc2c] | 359 | {
|
---|
[db484c9] | 360 | b.HasOne("FarmatikoData.Models.PharmacyHead", "PharmacyHead")
|
---|
| 361 | .WithMany("Pharmacies")
|
---|
[e0cdea2] | 362 | .HasForeignKey("PheadId");
|
---|
[a8ccc2c] | 363 | });
|
---|
| 364 |
|
---|
[db484c9] | 365 | modelBuilder.Entity("FarmatikoData.Models.PharmacyHead", b =>
|
---|
[a8ccc2c] | 366 | {
|
---|
[db484c9] | 367 | b.HasOne("FarmatikoData.Models.User", "User")
|
---|
| 368 | .WithMany()
|
---|
[0a694bb] | 369 | .HasForeignKey("UserID")
|
---|
| 370 | .OnDelete(DeleteBehavior.Cascade)
|
---|
| 371 | .IsRequired();
|
---|
[1db5673] | 372 | });
|
---|
| 373 |
|
---|
| 374 | modelBuilder.Entity("FarmatikoData.Models.PharmacyHeadMedicine", b =>
|
---|
| 375 | {
|
---|
[db484c9] | 376 | b.HasOne("FarmatikoData.Models.PharmacyHead", "Head")
|
---|
| 377 | .WithMany("Medicines")
|
---|
| 378 | .HasForeignKey("HeadId");
|
---|
| 379 |
|
---|
[1db5673] | 380 | b.HasOne("FarmatikoData.Models.Medicine", "Medicine")
|
---|
[db484c9] | 381 | .WithMany("Medicines")
|
---|
[1db5673] | 382 | .HasForeignKey("MedicineId")
|
---|
| 383 | .OnDelete(DeleteBehavior.Cascade)
|
---|
| 384 | .IsRequired();
|
---|
[a8ccc2c] | 385 | });
|
---|
| 386 |
|
---|
[d23bf72] | 387 | modelBuilder.Entity("FarmatikoData.Models.RequestPharmacyHead", b =>
|
---|
[a8ccc2c] | 388 | {
|
---|
[d23bf72] | 389 | b.HasOne("FarmatikoData.Models.PharmacyHead", "Head")
|
---|
[a8ccc2c] | 390 | .WithMany()
|
---|
[e0cdea2] | 391 | .HasForeignKey("HeadId");
|
---|
[a8ccc2c] | 392 |
|
---|
[d23bf72] | 393 | b.HasOne("FarmatikoData.Models.Pharmacy", "Pharmacy")
|
---|
[a8ccc2c] | 394 | .WithMany()
|
---|
[e0cdea2] | 395 | .HasForeignKey("PharmacyId");
|
---|
[a8ccc2c] | 396 | });
|
---|
| 397 | #pragma warning restore 612, 618
|
---|
| 398 | }
|
---|
| 399 | }
|
---|
| 400 | }
|
---|