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