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