feat: initial datamodel + ef connection and migrations

Initial version of the data model
Includes EF initialization and migrations
EF migrations are applied on application start
This commit is contained in:
2026-04-09 10:36:09 +02:00
commit 16160f6424
45 changed files with 2522 additions and 0 deletions
@@ -0,0 +1,46 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using TournamentOrganizer;
#nullable disable
namespace TournamentOrganizer.Migrations
{
[DbContext(typeof(TournamentContext))]
[Migration("20260409072947_InitialEvent")]
partial class InitialEvent
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "10.0.5");
modelBuilder.Entity("TournamentOrganizer.Models.Event", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<DateTime>("EventEnd")
.HasColumnType("TEXT");
b.Property<DateTime>("EventStart")
.HasColumnType("TEXT");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("Events");
});
#pragma warning restore 612, 618
}
}
}