first commit

This commit is contained in:
2026-03-22 00:29:34 +01:00
commit c16b4e3933
1729 changed files with 162013 additions and 0 deletions
@@ -0,0 +1,267 @@
// <auto-generated />
using System;
using BethanysPieShopHRM.Api.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace BethanysPieShopHRM.Api.Migrations
{
[DbContext(typeof(AppDbContext))]
[Migration("20260319223542_InitialMigration")]
partial class InitialMigration
{
/// <inheritdoc />
protected override void BuildTargetModel(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<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
}
}
}
@@ -0,0 +1,145 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
namespace BethanysPieShopHRM.Api.Migrations
{
/// <inheritdoc />
public partial class InitialMigration : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Countries",
columns: table => new
{
CountryId = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
Name = table.Column<string>(type: "TEXT", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Countries", x => x.CountryId);
});
migrationBuilder.CreateTable(
name: "JobCategories",
columns: table => new
{
JobCategoryId = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
JobCategoryName = table.Column<string>(type: "TEXT", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_JobCategories", x => x.JobCategoryId);
});
migrationBuilder.CreateTable(
name: "Employees",
columns: table => new
{
EmployeeId = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
FirstName = table.Column<string>(type: "TEXT", nullable: false),
LastName = table.Column<string>(type: "TEXT", nullable: false),
BirthDate = table.Column<DateTime>(type: "TEXT", nullable: false),
Email = table.Column<string>(type: "TEXT", nullable: false),
Street = table.Column<string>(type: "TEXT", nullable: false),
Zip = table.Column<string>(type: "TEXT", nullable: false),
City = table.Column<string>(type: "TEXT", nullable: false),
CountryId = table.Column<int>(type: "INTEGER", nullable: false),
PhoneNumber = table.Column<string>(type: "TEXT", nullable: false),
Smoker = table.Column<bool>(type: "INTEGER", nullable: false),
MaritalStatus = table.Column<int>(type: "INTEGER", nullable: false),
Gender = table.Column<int>(type: "INTEGER", nullable: false),
Comment = table.Column<string>(type: "TEXT", nullable: true),
JoinedDate = table.Column<DateTime>(type: "TEXT", nullable: true),
ExitDate = table.Column<DateTime>(type: "TEXT", nullable: true),
JobCategoryId = table.Column<int>(type: "INTEGER", nullable: false),
Latitude = table.Column<double>(type: "REAL", nullable: true),
Longitude = table.Column<double>(type: "REAL", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Employees", x => x.EmployeeId);
table.ForeignKey(
name: "FK_Employees_Countries_CountryId",
column: x => x.CountryId,
principalTable: "Countries",
principalColumn: "CountryId",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_Employees_JobCategories_JobCategoryId",
column: x => x.JobCategoryId,
principalTable: "JobCategories",
principalColumn: "JobCategoryId",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.InsertData(
table: "Countries",
columns: new[] { "CountryId", "Name" },
values: new object[,]
{
{ 1, "Belgium" },
{ 2, "Germany" },
{ 3, "Netherlands" },
{ 4, "USA" },
{ 5, "Japan" },
{ 6, "China" },
{ 7, "UK" },
{ 8, "France" },
{ 9, "Brazil" }
});
migrationBuilder.InsertData(
table: "JobCategories",
columns: new[] { "JobCategoryId", "JobCategoryName" },
values: new object[,]
{
{ 1, "Pie research" },
{ 2, "Sales" },
{ 3, "Management" },
{ 4, "Store staff" },
{ 5, "Finance" },
{ 6, "QA" },
{ 7, "IT" },
{ 8, "Cleaning" },
{ 9, "Bakery" }
});
migrationBuilder.InsertData(
table: "Employees",
columns: new[] { "EmployeeId", "BirthDate", "City", "Comment", "CountryId", "Email", "ExitDate", "FirstName", "Gender", "JobCategoryId", "JoinedDate", "LastName", "Latitude", "Longitude", "MaritalStatus", "PhoneNumber", "Smoker", "Street", "Zip" },
values: new object[] { 1, new DateTime(1979, 1, 16, 0, 0, 0, 0, DateTimeKind.Unspecified), "Brussels", "Lorem Ipsum", 1, "bethany@bethanyspieshop.com", null, "Bethany", 1, 1, new DateTime(2015, 3, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "Smith", 50.850299999999997, 4.3517000000000001, 1, "324777888773", false, "Grote Markt 1", "1000" });
migrationBuilder.CreateIndex(
name: "IX_Employees_CountryId",
table: "Employees",
column: "CountryId");
migrationBuilder.CreateIndex(
name: "IX_Employees_JobCategoryId",
table: "Employees",
column: "JobCategoryId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Employees");
migrationBuilder.DropTable(
name: "Countries");
migrationBuilder.DropTable(
name: "JobCategories");
}
}
}
@@ -0,0 +1,270 @@
// <auto-generated />
using System;
using BethanysPieShopHRM.Api.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace BethanysPieShopHRM.Api.Migrations
{
[DbContext(typeof(AppDbContext))]
[Migration("20260321160544_addingImageName")]
partial class addingImageName
{
/// <inheritdoc />
protected override void BuildTargetModel(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
}
}
}
@@ -0,0 +1,35 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BethanysPieShopHRM.Api.Migrations
{
/// <inheritdoc />
public partial class addingImageName : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "ImageName",
table: "Employees",
type: "TEXT",
nullable: true);
migrationBuilder.UpdateData(
table: "Employees",
keyColumn: "EmployeeId",
keyValue: 1,
column: "ImageName",
value: null);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "ImageName",
table: "Employees");
}
}
}
@@ -0,0 +1,267 @@
// <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
}
}
}