Startpunkten

This commit is contained in:
2026-03-05 15:43:26 +01:00
commit dd99fb7b01
95 changed files with 3262 additions and 0 deletions

View File

@@ -0,0 +1,154 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using PersonSport.Models;
namespace PersonSport.Migrations
{
[DbContext(typeof(IdrottContext))]
partial class IdrottContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "5.0.10");
modelBuilder.Entity("PersonSport.Models.Admin", b =>
{
b.Property<int>("AdminId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("Password")
.IsRequired()
.HasMaxLength(80)
.HasColumnType("TEXT");
b.Property<string>("Username")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.HasKey("AdminId");
b.ToTable("Administratorer");
});
modelBuilder.Entity("PersonSport.Models.Person", b =>
{
b.Property<int>("PersonId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<int>("Alder")
.HasColumnType("INTEGER");
b.Property<string>("Epost")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property<string>("PersonNamn")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property<DateTime>("StartDatum")
.HasColumnType("TEXT");
b.Property<string>("Visningsbild")
.HasMaxLength(80)
.HasColumnType("TEXT");
b.HasKey("PersonId");
b.ToTable("Personer");
});
modelBuilder.Entity("PersonSport.Models.PersonSport", b =>
{
b.Property<int>("PersonId")
.HasColumnType("INTEGER");
b.Property<int>("SportId")
.HasColumnType("INTEGER");
b.Property<DateTime>("StartDatum")
.HasColumnType("TEXT");
b.HasKey("PersonId", "SportId");
b.HasIndex("SportId");
b.ToTable("PersonSport");
});
modelBuilder.Entity("PersonSport.Models.Sport", b =>
{
b.Property<int>("SportId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("Bakgrundsbild")
.IsRequired()
.HasMaxLength(60)
.HasColumnType("TEXT");
b.Property<string>("DetaljText")
.HasMaxLength(2000)
.HasColumnType("TEXT");
b.Property<string>("Ingress")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("TEXT");
b.Property<string>("SportNamn")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property<string>("Traningstider")
.HasMaxLength(200)
.HasColumnType("TEXT");
b.HasKey("SportId");
b.ToTable("Sporter");
});
modelBuilder.Entity("PersonSport.Models.PersonSport", b =>
{
b.HasOne("PersonSport.Models.Person", "Person")
.WithMany("PersonSporter")
.HasForeignKey("PersonId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.HasOne("PersonSport.Models.Sport", "Sport")
.WithMany("PersonSporter")
.HasForeignKey("SportId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.Navigation("Person");
b.Navigation("Sport");
});
modelBuilder.Entity("PersonSport.Models.Person", b =>
{
b.Navigation("PersonSporter");
});
modelBuilder.Entity("PersonSport.Models.Sport", b =>
{
b.Navigation("PersonSporter");
});
#pragma warning restore 612, 618
}
}
}