//
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using timetracker.Data;
#nullable disable
namespace timetracker.Data.Migrations
{
[DbContext(typeof(TimetrackerDbContext))]
[Migration("20260624204954_AddMultiTenancy")]
partial class AddMultiTenancy
{
///
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "10.0.8");
modelBuilder.Entity("timetracker.Shared.AppSettings", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("DailyTargetHours")
.HasColumnType("REAL");
b.Property("FlexTimeStartDate")
.HasColumnType("TEXT");
b.Property("FlexTimeStartingBalanceHours")
.HasColumnType("REAL");
b.Property("GermanState")
.HasColumnType("TEXT");
b.Property("MinimumBreakMinutes")
.HasColumnType("INTEGER");
b.Property("TenantId")
.HasColumnType("INTEGER");
b.Property("UserId")
.HasColumnType("INTEGER");
b.Property("VacationDaysPerYear")
.HasColumnType("INTEGER");
b.Property("WorkFriday")
.HasColumnType("INTEGER");
b.Property("WorkMonday")
.HasColumnType("INTEGER");
b.Property("WorkSaturday")
.HasColumnType("INTEGER");
b.Property("WorkSunday")
.HasColumnType("INTEGER");
b.Property("WorkThursday")
.HasColumnType("INTEGER");
b.Property("WorkTuesday")
.HasColumnType("INTEGER");
b.Property("WorkWednesday")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.ToTable("AppSettings");
});
modelBuilder.Entity("timetracker.Shared.BreakEntry", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("EndTime")
.HasColumnType("TEXT");
b.Property("StartTime")
.HasColumnType("TEXT");
b.Property("WorkDayId")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("WorkDayId");
b.ToTable("BreakEntries");
});
modelBuilder.Entity("timetracker.Shared.PublicHoliday", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("Counties")
.HasColumnType("TEXT");
b.Property("Date")
.HasColumnType("TEXT");
b.Property("Name")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("PublicHolidays");
});
modelBuilder.Entity("timetracker.Shared.Tenant", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("CreatedAt")
.HasColumnType("TEXT");
b.Property("IsApproved")
.HasColumnType("INTEGER");
b.Property("Name")
.IsRequired()
.HasColumnType("TEXT");
b.Property("Subdomain")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("Subdomain")
.IsUnique();
b.ToTable("Tenants");
});
modelBuilder.Entity("timetracker.Shared.User", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("PasswordHash")
.IsRequired()
.HasColumnType("TEXT");
b.Property("PasswordSalt")
.IsRequired()
.HasColumnType("TEXT");
b.Property("TenantId")
.HasColumnType("INTEGER");
b.Property("Username")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("TenantId");
b.ToTable("Users");
});
modelBuilder.Entity("timetracker.Shared.VacationDay", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("Date")
.HasColumnType("TEXT");
b.Property("Note")
.HasColumnType("TEXT");
b.Property("TenantId")
.HasColumnType("INTEGER");
b.Property("UserId")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.ToTable("VacationDays");
});
modelBuilder.Entity("timetracker.Shared.WorkDay", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("Date")
.HasColumnType("TEXT");
b.Property("EndTime")
.HasColumnType("TEXT");
b.Property("StartTime")
.HasColumnType("TEXT");
b.Property("TenantId")
.HasColumnType("INTEGER");
b.Property("UserId")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.ToTable("WorkDays");
});
modelBuilder.Entity("timetracker.Shared.BreakEntry", b =>
{
b.HasOne("timetracker.Shared.WorkDay", "WorkDay")
.WithMany("Breaks")
.HasForeignKey("WorkDayId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("WorkDay");
});
modelBuilder.Entity("timetracker.Shared.User", b =>
{
b.HasOne("timetracker.Shared.Tenant", "Tenant")
.WithMany()
.HasForeignKey("TenantId");
b.Navigation("Tenant");
});
modelBuilder.Entity("timetracker.Shared.WorkDay", b =>
{
b.Navigation("Breaks");
});
#pragma warning restore 612, 618
}
}
}