268 lines
9.2 KiB
C#
268 lines
9.2 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using BethanysPieShopHRM.Api.Models;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
|
|
#nullable disable
|
|
|
|
namespace BethanysPieShopHRM.Api.Migrations
|
|
{
|
|
[DbContext(typeof(AppDbContext))]
|
|
partial class AppDbContextModelSnapshot : ModelSnapshot
|
|
{
|
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder.HasAnnotation("ProductVersion", "10.0.5");
|
|
|
|
modelBuilder.Entity("BethanysPieShopHRM.Shared.Domain.Country", b =>
|
|
{
|
|
b.Property<int>("CountryId")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("CountryId");
|
|
|
|
b.ToTable("Countries");
|
|
|
|
b.HasData(
|
|
new
|
|
{
|
|
CountryId = 1,
|
|
Name = "Belgium"
|
|
},
|
|
new
|
|
{
|
|
CountryId = 2,
|
|
Name = "Germany"
|
|
},
|
|
new
|
|
{
|
|
CountryId = 3,
|
|
Name = "Netherlands"
|
|
},
|
|
new
|
|
{
|
|
CountryId = 4,
|
|
Name = "USA"
|
|
},
|
|
new
|
|
{
|
|
CountryId = 5,
|
|
Name = "Japan"
|
|
},
|
|
new
|
|
{
|
|
CountryId = 6,
|
|
Name = "China"
|
|
},
|
|
new
|
|
{
|
|
CountryId = 7,
|
|
Name = "UK"
|
|
},
|
|
new
|
|
{
|
|
CountryId = 8,
|
|
Name = "France"
|
|
},
|
|
new
|
|
{
|
|
CountryId = 9,
|
|
Name = "Brazil"
|
|
});
|
|
});
|
|
|
|
modelBuilder.Entity("BethanysPieShopHRM.Shared.Domain.Employee", b =>
|
|
{
|
|
b.Property<int>("EmployeeId")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<DateTime>("BirthDate")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("City")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Comment")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int>("CountryId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Email")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<DateTime?>("ExitDate")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("FirstName")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int>("Gender")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("ImageName")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int>("JobCategoryId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<DateTime?>("JoinedDate")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("LastName")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<double?>("Latitude")
|
|
.HasColumnType("REAL");
|
|
|
|
b.Property<double?>("Longitude")
|
|
.HasColumnType("REAL");
|
|
|
|
b.Property<int>("MaritalStatus")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("PhoneNumber")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<bool>("Smoker")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Street")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Zip")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("EmployeeId");
|
|
|
|
b.HasIndex("CountryId");
|
|
|
|
b.HasIndex("JobCategoryId");
|
|
|
|
b.ToTable("Employees");
|
|
|
|
b.HasData(
|
|
new
|
|
{
|
|
EmployeeId = 1,
|
|
BirthDate = new DateTime(1979, 1, 16, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
|
City = "Brussels",
|
|
Comment = "Lorem Ipsum",
|
|
CountryId = 1,
|
|
Email = "bethany@bethanyspieshop.com",
|
|
FirstName = "Bethany",
|
|
Gender = 1,
|
|
JobCategoryId = 1,
|
|
JoinedDate = new DateTime(2015, 3, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
|
LastName = "Smith",
|
|
Latitude = 50.850299999999997,
|
|
Longitude = 4.3517000000000001,
|
|
MaritalStatus = 1,
|
|
PhoneNumber = "324777888773",
|
|
Smoker = false,
|
|
Street = "Grote Markt 1",
|
|
Zip = "1000"
|
|
});
|
|
});
|
|
|
|
modelBuilder.Entity("BethanysPieShopHRM.Shared.Domain.JobCategory", b =>
|
|
{
|
|
b.Property<int>("JobCategoryId")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("JobCategoryName")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("JobCategoryId");
|
|
|
|
b.ToTable("JobCategories");
|
|
|
|
b.HasData(
|
|
new
|
|
{
|
|
JobCategoryId = 1,
|
|
JobCategoryName = "Pie research"
|
|
},
|
|
new
|
|
{
|
|
JobCategoryId = 2,
|
|
JobCategoryName = "Sales"
|
|
},
|
|
new
|
|
{
|
|
JobCategoryId = 3,
|
|
JobCategoryName = "Management"
|
|
},
|
|
new
|
|
{
|
|
JobCategoryId = 4,
|
|
JobCategoryName = "Store staff"
|
|
},
|
|
new
|
|
{
|
|
JobCategoryId = 5,
|
|
JobCategoryName = "Finance"
|
|
},
|
|
new
|
|
{
|
|
JobCategoryId = 6,
|
|
JobCategoryName = "QA"
|
|
},
|
|
new
|
|
{
|
|
JobCategoryId = 7,
|
|
JobCategoryName = "IT"
|
|
},
|
|
new
|
|
{
|
|
JobCategoryId = 8,
|
|
JobCategoryName = "Cleaning"
|
|
},
|
|
new
|
|
{
|
|
JobCategoryId = 9,
|
|
JobCategoryName = "Bakery"
|
|
});
|
|
});
|
|
|
|
modelBuilder.Entity("BethanysPieShopHRM.Shared.Domain.Employee", b =>
|
|
{
|
|
b.HasOne("BethanysPieShopHRM.Shared.Domain.Country", "Country")
|
|
.WithMany()
|
|
.HasForeignKey("CountryId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("BethanysPieShopHRM.Shared.Domain.JobCategory", "JobCategory")
|
|
.WithMany()
|
|
.HasForeignKey("JobCategoryId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Country");
|
|
|
|
b.Navigation("JobCategory");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|