Change AgeGroup ID type from int to string and add migration

Refactored AgeGroupController, AgeGroupService, and IAgeGroupService to use string IDs instead of int. Added initial Entity Framework migration and database files to support AltersGruppe with string primary key.
This commit is contained in:
2025-12-07 20:32:49 +01:00
parent 9128b199e9
commit aacd8b7d96
9 changed files with 133 additions and 9 deletions

View File

@@ -0,0 +1,46 @@
// <auto-generated />
using API.Database;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace API.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20251207192702_Init")]
partial class Init
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "9.0.11");
modelBuilder.Entity("API.Models.Internal.Altersgruppen.AltersGruppe", b =>
{
b.Property<string>("Id")
.HasMaxLength(26)
.HasColumnType("TEXT");
b.Property<int>("EndingAge")
.HasColumnType("INTEGER");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<int>("StartingAge")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.ToTable("Altersgruppen");
});
#pragma warning restore 612, 618
}
}
}