[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))]
|
---|
[d23bf72] | 13 | [Migration("20201105055526_NewMigration")]
|
---|
| 14 | partial class NewMigration
|
---|
[a8ccc2c] | 15 | {
|
---|
| 16 | protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
---|
| 17 | {
|
---|
| 18 | #pragma warning disable 612, 618
|
---|
| 19 | modelBuilder
|
---|
| 20 | .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn)
|
---|
| 21 | .HasAnnotation("ProductVersion", "3.1.6")
|
---|
| 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")
|
---|
| 29 | .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
---|
| 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")
|
---|
| 69 | .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
---|
| 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")
|
---|
| 103 | .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
---|
| 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 |
|
---|
| 138 | b.ToTable("Medicines");
|
---|
| 139 | });
|
---|
| 140 |
|
---|
| 141 | modelBuilder.Entity("FarmatikoData.Models.MedicineList", b =>
|
---|
| 142 | {
|
---|
| 143 | b.Property<int>("Id")
|
---|
| 144 | .ValueGeneratedOnAdd()
|
---|
| 145 | .HasColumnType("integer")
|
---|
| 146 | .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
---|
| 147 |
|
---|
| 148 | b.Property<DateTime>("CreatedOn")
|
---|
| 149 | .HasColumnType("timestamp without time zone");
|
---|
| 150 |
|
---|
[d23bf72] | 151 | b.Property<DateTime?>("DeletedOn")
|
---|
[a8ccc2c] | 152 | .HasColumnType("timestamp without time zone");
|
---|
| 153 |
|
---|
| 154 | b.Property<bool>("HasMedicine")
|
---|
| 155 | .HasColumnType("boolean");
|
---|
| 156 |
|
---|
[d23bf72] | 157 | b.Property<int>("MedicineId")
|
---|
[a8ccc2c] | 158 | .HasColumnType("integer");
|
---|
| 159 |
|
---|
| 160 | b.Property<int?>("PharmacyHeadId")
|
---|
| 161 | .HasColumnType("integer");
|
---|
| 162 |
|
---|
| 163 | b.HasKey("Id");
|
---|
| 164 |
|
---|
[d23bf72] | 165 | b.HasIndex("MedicineId");
|
---|
[a8ccc2c] | 166 |
|
---|
| 167 | b.HasIndex("PharmacyHeadId");
|
---|
| 168 |
|
---|
| 169 | b.ToTable("MedicineLists");
|
---|
| 170 | });
|
---|
| 171 |
|
---|
| 172 | modelBuilder.Entity("FarmatikoData.Models.Pandemic", b =>
|
---|
| 173 | {
|
---|
| 174 | b.Property<int>("Id")
|
---|
| 175 | .ValueGeneratedOnAdd()
|
---|
| 176 | .HasColumnType("integer")
|
---|
| 177 | .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
---|
| 178 |
|
---|
[d23bf72] | 179 | b.Property<long>("ActiveGlobal")
|
---|
| 180 | .HasColumnType("bigint");
|
---|
[a8ccc2c] | 181 |
|
---|
| 182 | b.Property<int>("ActiveMK")
|
---|
| 183 | .HasColumnType("integer");
|
---|
| 184 |
|
---|
| 185 | b.Property<DateTime>("CreatedOn")
|
---|
| 186 | .HasColumnType("timestamp without time zone");
|
---|
| 187 |
|
---|
[d23bf72] | 188 | b.Property<long>("DeathsGlobal")
|
---|
| 189 | .HasColumnType("bigint");
|
---|
[a8ccc2c] | 190 |
|
---|
| 191 | b.Property<int>("DeathsMK")
|
---|
| 192 | .HasColumnType("integer");
|
---|
| 193 |
|
---|
[d23bf72] | 194 | b.Property<DateTime?>("DeletedOn")
|
---|
[a8ccc2c] | 195 | .HasColumnType("timestamp without time zone");
|
---|
| 196 |
|
---|
| 197 | b.Property<string>("Name")
|
---|
[d23bf72] | 198 | .IsRequired()
|
---|
[a8ccc2c] | 199 | .HasColumnType("text");
|
---|
| 200 |
|
---|
| 201 | b.Property<int>("NewMK")
|
---|
| 202 | .HasColumnType("integer");
|
---|
| 203 |
|
---|
[d23bf72] | 204 | b.Property<long>("TotalGlobal")
|
---|
| 205 | .HasColumnType("bigint");
|
---|
[a8ccc2c] | 206 |
|
---|
| 207 | b.Property<int>("TotalMK")
|
---|
| 208 | .HasColumnType("integer");
|
---|
| 209 |
|
---|
| 210 | b.HasKey("Id");
|
---|
| 211 |
|
---|
| 212 | b.ToTable("Pandemics");
|
---|
| 213 | });
|
---|
| 214 |
|
---|
| 215 | modelBuilder.Entity("FarmatikoData.Models.Pharmacy", b =>
|
---|
| 216 | {
|
---|
| 217 | b.Property<int>("Id")
|
---|
| 218 | .ValueGeneratedOnAdd()
|
---|
| 219 | .HasColumnType("integer")
|
---|
| 220 | .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
---|
| 221 |
|
---|
| 222 | b.Property<string>("Address")
|
---|
[d23bf72] | 223 | .IsRequired()
|
---|
[a8ccc2c] | 224 | .HasColumnType("text");
|
---|
| 225 |
|
---|
| 226 | b.Property<DateTime>("CreatedOn")
|
---|
| 227 | .HasColumnType("timestamp without time zone");
|
---|
| 228 |
|
---|
[d23bf72] | 229 | b.Property<DateTime?>("DeletedOn")
|
---|
[a8ccc2c] | 230 | .HasColumnType("timestamp without time zone");
|
---|
| 231 |
|
---|
| 232 | b.Property<string>("Location")
|
---|
[d23bf72] | 233 | .IsRequired()
|
---|
[a8ccc2c] | 234 | .HasColumnType("text");
|
---|
| 235 |
|
---|
| 236 | b.Property<string>("Name")
|
---|
[d23bf72] | 237 | .IsRequired()
|
---|
[a8ccc2c] | 238 | .HasColumnType("text");
|
---|
| 239 |
|
---|
| 240 | b.Property<int?>("PharmacyHeadId")
|
---|
| 241 | .HasColumnType("integer");
|
---|
| 242 |
|
---|
| 243 | b.Property<bool>("WorkAllTime")
|
---|
| 244 | .HasColumnType("boolean");
|
---|
| 245 |
|
---|
| 246 | b.HasKey("Id");
|
---|
| 247 |
|
---|
| 248 | b.HasIndex("PharmacyHeadId");
|
---|
| 249 |
|
---|
| 250 | b.ToTable("Pharmacies");
|
---|
| 251 | });
|
---|
| 252 |
|
---|
| 253 | modelBuilder.Entity("FarmatikoData.Models.PharmacyHead", b =>
|
---|
| 254 | {
|
---|
| 255 | b.Property<int>("Id")
|
---|
| 256 | .ValueGeneratedOnAdd()
|
---|
| 257 | .HasColumnType("integer")
|
---|
| 258 | .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
---|
| 259 |
|
---|
| 260 | b.Property<DateTime>("CreatedOn")
|
---|
| 261 | .HasColumnType("timestamp without time zone");
|
---|
| 262 |
|
---|
[d23bf72] | 263 | b.Property<DateTime?>("DeletedOn")
|
---|
[a8ccc2c] | 264 | .HasColumnType("timestamp without time zone");
|
---|
| 265 |
|
---|
| 266 | b.Property<string>("Email")
|
---|
[d23bf72] | 267 | .IsRequired()
|
---|
[a8ccc2c] | 268 | .HasColumnType("text");
|
---|
| 269 |
|
---|
| 270 | b.Property<string>("Name")
|
---|
[d23bf72] | 271 | .IsRequired()
|
---|
[a8ccc2c] | 272 | .HasColumnType("text");
|
---|
| 273 |
|
---|
| 274 | b.Property<string>("Password")
|
---|
[d23bf72] | 275 | .IsRequired()
|
---|
[a8ccc2c] | 276 | .HasColumnType("text");
|
---|
| 277 |
|
---|
[d23bf72] | 278 | b.HasKey("Id");
|
---|
| 279 |
|
---|
| 280 | b.ToTable("PharmacyHeads");
|
---|
| 281 | });
|
---|
| 282 |
|
---|
| 283 | modelBuilder.Entity("FarmatikoData.Models.RequestPharmacyHead", b =>
|
---|
| 284 | {
|
---|
| 285 | b.Property<int>("Id")
|
---|
| 286 | .ValueGeneratedOnAdd()
|
---|
| 287 | .HasColumnType("integer")
|
---|
| 288 | .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
---|
| 289 |
|
---|
| 290 | b.Property<DateTime>("CreatedOn")
|
---|
| 291 | .HasColumnType("timestamp without time zone");
|
---|
| 292 |
|
---|
| 293 | b.Property<DateTime?>("DeletedOn")
|
---|
| 294 | .HasColumnType("timestamp without time zone");
|
---|
| 295 |
|
---|
| 296 | b.Property<int>("HeadId")
|
---|
[a8ccc2c] | 297 | .HasColumnType("integer");
|
---|
| 298 |
|
---|
[d23bf72] | 299 | b.Property<int>("PharmacyId")
|
---|
[a8ccc2c] | 300 | .HasColumnType("integer");
|
---|
| 301 |
|
---|
| 302 | b.HasKey("Id");
|
---|
| 303 |
|
---|
[d23bf72] | 304 | b.HasIndex("HeadId");
|
---|
| 305 |
|
---|
[a8ccc2c] | 306 | b.HasIndex("PharmacyId");
|
---|
| 307 |
|
---|
[d23bf72] | 308 | b.ToTable("PHRequests");
|
---|
| 309 | });
|
---|
[a8ccc2c] | 310 |
|
---|
[d23bf72] | 311 | modelBuilder.Entity("FarmatikoData.Models.User", b =>
|
---|
| 312 | {
|
---|
| 313 | b.Property<int>("Id")
|
---|
| 314 | .ValueGeneratedOnAdd()
|
---|
| 315 | .HasColumnType("integer")
|
---|
| 316 | .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
---|
| 317 |
|
---|
| 318 | b.Property<DateTime>("CreatedOn")
|
---|
| 319 | .HasColumnType("timestamp without time zone");
|
---|
| 320 |
|
---|
| 321 | b.Property<DateTime?>("DeletedOn")
|
---|
| 322 | .HasColumnType("timestamp without time zone");
|
---|
| 323 |
|
---|
| 324 | b.Property<string>("Email")
|
---|
| 325 | .HasColumnType("text");
|
---|
| 326 |
|
---|
| 327 | b.Property<string>("Name")
|
---|
| 328 | .HasColumnType("text");
|
---|
| 329 |
|
---|
| 330 | b.Property<string>("Password")
|
---|
| 331 | .HasColumnType("text");
|
---|
| 332 |
|
---|
| 333 | b.Property<int>("UserRole")
|
---|
| 334 | .HasColumnType("integer");
|
---|
| 335 |
|
---|
| 336 | b.HasKey("Id");
|
---|
| 337 |
|
---|
| 338 | b.ToTable("Users");
|
---|
[a8ccc2c] | 339 | });
|
---|
| 340 |
|
---|
[d23bf72] | 341 | modelBuilder.Entity("FarmatikoData.Models.HealthcareWorker", b =>
|
---|
[a8ccc2c] | 342 | {
|
---|
[d23bf72] | 343 | b.HasOne("FarmatikoData.Models.HealthFacility", "Facility")
|
---|
[a8ccc2c] | 344 | .WithMany()
|
---|
| 345 | .HasForeignKey("FacilityId")
|
---|
| 346 | .OnDelete(DeleteBehavior.Cascade)
|
---|
| 347 | .IsRequired();
|
---|
| 348 | });
|
---|
| 349 |
|
---|
| 350 | modelBuilder.Entity("FarmatikoData.Models.MedicineList", b =>
|
---|
| 351 | {
|
---|
[d23bf72] | 352 | b.HasOne("FarmatikoData.Models.Medicine", "Medicine")
|
---|
[a8ccc2c] | 353 | .WithMany()
|
---|
[d23bf72] | 354 | .HasForeignKey("MedicineId")
|
---|
| 355 | .OnDelete(DeleteBehavior.Cascade)
|
---|
| 356 | .IsRequired();
|
---|
[a8ccc2c] | 357 |
|
---|
| 358 | b.HasOne("FarmatikoData.Models.PharmacyHead", null)
|
---|
| 359 | .WithMany("MedicineLists")
|
---|
| 360 | .HasForeignKey("PharmacyHeadId");
|
---|
| 361 | });
|
---|
| 362 |
|
---|
| 363 | modelBuilder.Entity("FarmatikoData.Models.Pharmacy", b =>
|
---|
| 364 | {
|
---|
| 365 | b.HasOne("FarmatikoData.Models.PharmacyHead", null)
|
---|
| 366 | .WithMany("PharmaciesList")
|
---|
| 367 | .HasForeignKey("PharmacyHeadId");
|
---|
| 368 | });
|
---|
| 369 |
|
---|
[d23bf72] | 370 | modelBuilder.Entity("FarmatikoData.Models.RequestPharmacyHead", b =>
|
---|
[a8ccc2c] | 371 | {
|
---|
[d23bf72] | 372 | b.HasOne("FarmatikoData.Models.PharmacyHead", "Head")
|
---|
[a8ccc2c] | 373 | .WithMany()
|
---|
[d23bf72] | 374 | .HasForeignKey("HeadId")
|
---|
| 375 | .OnDelete(DeleteBehavior.Cascade)
|
---|
| 376 | .IsRequired();
|
---|
[a8ccc2c] | 377 |
|
---|
[d23bf72] | 378 | b.HasOne("FarmatikoData.Models.Pharmacy", "Pharmacy")
|
---|
[a8ccc2c] | 379 | .WithMany()
|
---|
[d23bf72] | 380 | .HasForeignKey("PharmacyId")
|
---|
| 381 | .OnDelete(DeleteBehavior.Cascade)
|
---|
| 382 | .IsRequired();
|
---|
[a8ccc2c] | 383 | });
|
---|
| 384 | #pragma warning restore 612, 618
|
---|
| 385 | }
|
---|
| 386 | }
|
---|
| 387 | }
|
---|