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