//
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using OnProfNext.Server.Data;
#nullable disable
namespace OnProfNext.Server.Migrations
{
[DbContext(typeof(AppDbContext))]
[Migration("20251014114821_AddProjectsTable")]
partial class AddProjectsTable
{
///
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "9.0.9")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("OnProfNext.Shared.Models.Project", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("CreatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasDefaultValueSql("SYSDATETIME()");
b.Property("Description")
.HasMaxLength(1000)
.HasColumnType("nvarchar(1000)");
b.Property("EndDate")
.HasColumnType("datetime2");
b.Property("MandantId")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasDefaultValue(1);
b.Property("ProjectManager")
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property("ProjectName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.Property("StartDate")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasDefaultValueSql("SYSDATETIME()");
b.Property("Status")
.IsRequired()
.ValueGeneratedOnAdd()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)")
.HasDefaultValue("Geplant");
b.Property("UpdatedAt")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("datetime2")
.HasDefaultValueSql("SYSDATETIME()");
b.HasKey("Id");
b.ToTable("Projects", (string)null);
});
modelBuilder.Entity("OnProfNext.Shared.Models.User", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("CreatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasDefaultValueSql("SYSDATETIME()");
b.Property("Email")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property("FirstName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property("IsActive")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(true);
b.Property("LastName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property("MandantId")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasDefaultValue(1);
b.Property("PasswordHash")
.IsRequired()
.HasMaxLength(512)
.HasColumnType("nvarchar(512)");
b.Property("UpdatedAt")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("datetime2")
.HasDefaultValueSql("SYSDATETIME()");
b.Property("Username")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.HasKey("Id");
b.ToTable("Users", (string)null);
});
#pragma warning restore 612, 618
}
}
}