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