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