CleanUp
This commit is contained in:
@@ -8,7 +8,7 @@ namespace Apollon.Domain.Models
|
||||
{
|
||||
public class NameList
|
||||
{
|
||||
public NameList(Guid id,string firstName, string lastName, int passNumber, string society, int societyNumber, string birthday, string country)
|
||||
public NameList(Guid id, string firstName, string lastName, int passNumber, string society, int societyNumber, string birthday, string country, int qualification)
|
||||
{
|
||||
Id = id;
|
||||
FirstName = firstName;
|
||||
@@ -18,15 +18,17 @@ namespace Apollon.Domain.Models
|
||||
SocietyNumber = societyNumber;
|
||||
Birthday = birthday;
|
||||
Country = country;
|
||||
Qualification = qualification;
|
||||
}
|
||||
|
||||
public Guid Id { get; }
|
||||
public string FirstName { get; }
|
||||
public string LastName { get; }
|
||||
public int PassNumber { get; }
|
||||
public string Society { get; }
|
||||
public int SocietyNumber { get; }
|
||||
public string Birthday { get; }
|
||||
public string Country { get; }
|
||||
}
|
||||
public string Society { get; }
|
||||
public int SocietyNumber { get; }
|
||||
public string Birthday { get; }
|
||||
public string Country { get; }
|
||||
public int Qualification { get; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Apollon.Domain.Models
|
||||
{
|
||||
public class Tournament
|
||||
{
|
||||
public Tournament(Guid id, string logo, string organisation, string tournamentName, string competition, string competitionImage, DateTime startDate, DateTime endDate, string location, int rounds)
|
||||
public Tournament(Guid id, string logo, string organisation, string tournamentName, string competition, string competitionImage, DateTime startDate, DateTime endDate, string location, int rounds, int targets)
|
||||
{
|
||||
Id = id;
|
||||
Logo = logo;
|
||||
@@ -20,6 +20,7 @@ namespace Apollon.Domain.Models
|
||||
EndDate = endDate;
|
||||
Location = location;
|
||||
Rounds = rounds;
|
||||
Targets = targets;
|
||||
}
|
||||
|
||||
public Guid Id { get; }
|
||||
@@ -32,6 +33,7 @@ namespace Apollon.Domain.Models
|
||||
public DateTime EndDate { get; }
|
||||
public string Location { get; }
|
||||
public int Rounds { get; }
|
||||
public int Targets { get; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@ namespace Apollon.EntityFramework.Commands
|
||||
EndDate = tournament.EndDate,
|
||||
Location = tournament.Location,
|
||||
Rounds = tournament.Rounds,
|
||||
Targets = tournament.Targets,
|
||||
};
|
||||
|
||||
context.Tournaments.Add(tournamentDto);
|
||||
|
||||
@@ -34,6 +34,7 @@ namespace Apollon.EntityFramework.Commands
|
||||
EndDate = tournament.EndDate,
|
||||
Location = tournament.Location,
|
||||
Rounds = tournament.Rounds,
|
||||
Targets = tournament.Targets,
|
||||
};
|
||||
|
||||
context.Tournaments.Update(tournamentDto);
|
||||
|
||||
@@ -16,5 +16,6 @@ namespace Apollon.EntityFramework.DTOs
|
||||
public int SocietyNumber { get; set; }
|
||||
public string Birthday { get; set; }
|
||||
public string Country { get; set; }
|
||||
public int Qualification { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,5 +18,6 @@ namespace Apollon.EntityFramework.DTOs
|
||||
public DateTime EndDate { get; set; }
|
||||
public string Location { get; set; }
|
||||
public int Rounds { get; set; }
|
||||
public int Targets { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
118
Apollon.EntityFramework/Migrations/20221113173340_Targets.Designer.cs
generated
Normal file
118
Apollon.EntityFramework/Migrations/20221113173340_Targets.Designer.cs
generated
Normal file
@@ -0,0 +1,118 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Apollon.EntityFramework;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Apollon.EntityFramework.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
[Migration("20221113173340_Targets")]
|
||||
partial class Targets
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "6.0.8")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
|
||||
|
||||
modelBuilder.Entity("Apollon.EntityFramework.DTOs.CompetitionDto", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
|
||||
|
||||
b.Property<string>("CompetitionImage")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CompetitionName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Competition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Apollon.EntityFramework.DTOs.NameListDto", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Birthday")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Country")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("FirstName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("LastName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("PassNumber")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Society")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("SocietyNumber")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("NameList");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Apollon.EntityFramework.DTOs.TournamentDto", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Competition")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CompetitionImage")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("EndDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Location")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Logo")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Organisation")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Rounds")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("StartDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("TournamentName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Tournaments");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
54
Apollon.EntityFramework/Migrations/20221113173340_Targets.cs
Normal file
54
Apollon.EntityFramework/Migrations/20221113173340_Targets.cs
Normal file
@@ -0,0 +1,54 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Apollon.EntityFramework.Migrations
|
||||
{
|
||||
public partial class Targets : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Competition",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
CompetitionName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
CompetitionImage = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Competition", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "NameList",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
FirstName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
LastName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
PassNumber = table.Column<int>(type: "int", nullable: false),
|
||||
Society = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
SocietyNumber = table.Column<int>(type: "int", nullable: false),
|
||||
Birthday = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Country = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_NameList", x => x.Id);
|
||||
});
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "Competition");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "NameList");
|
||||
}
|
||||
}
|
||||
}
|
||||
121
Apollon.EntityFramework/Migrations/20221113173650_Target.Designer.cs
generated
Normal file
121
Apollon.EntityFramework/Migrations/20221113173650_Target.Designer.cs
generated
Normal file
@@ -0,0 +1,121 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Apollon.EntityFramework;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Apollon.EntityFramework.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
[Migration("20221113173650_Target")]
|
||||
partial class Target
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "6.0.8")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
|
||||
|
||||
modelBuilder.Entity("Apollon.EntityFramework.DTOs.CompetitionDto", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
|
||||
|
||||
b.Property<string>("CompetitionImage")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CompetitionName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Competition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Apollon.EntityFramework.DTOs.NameListDto", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Birthday")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Country")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("FirstName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("LastName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("PassNumber")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Society")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("SocietyNumber")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("NameList");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Apollon.EntityFramework.DTOs.TournamentDto", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Competition")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CompetitionImage")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("EndDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Location")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Logo")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Organisation")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Rounds")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("StartDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("Targets")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("TournamentName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Tournaments");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
26
Apollon.EntityFramework/Migrations/20221113173650_Target.cs
Normal file
26
Apollon.EntityFramework/Migrations/20221113173650_Target.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Apollon.EntityFramework.Migrations
|
||||
{
|
||||
public partial class Target : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "Targets",
|
||||
table: "Tournaments",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Targets",
|
||||
table: "Tournaments");
|
||||
}
|
||||
}
|
||||
}
|
||||
121
Apollon.EntityFramework/Migrations/20221113174443_T.Designer.cs
generated
Normal file
121
Apollon.EntityFramework/Migrations/20221113174443_T.Designer.cs
generated
Normal file
@@ -0,0 +1,121 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Apollon.EntityFramework;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Apollon.EntityFramework.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
[Migration("20221113174443_T")]
|
||||
partial class T
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "6.0.8")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
|
||||
|
||||
modelBuilder.Entity("Apollon.EntityFramework.DTOs.CompetitionDto", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
|
||||
|
||||
b.Property<string>("CompetitionImage")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CompetitionName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Competition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Apollon.EntityFramework.DTOs.NameListDto", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Birthday")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Country")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("FirstName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("LastName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("PassNumber")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Society")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("SocietyNumber")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("NameList");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Apollon.EntityFramework.DTOs.TournamentDto", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Competition")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CompetitionImage")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("EndDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Location")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Logo")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Organisation")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Rounds")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("StartDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("Targets")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("TournamentName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Tournaments");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Apollon.EntityFramework/Migrations/20221113174443_T.cs
Normal file
19
Apollon.EntityFramework/Migrations/20221113174443_T.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Apollon.EntityFramework.Migrations
|
||||
{
|
||||
public partial class T : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
124
Apollon.EntityFramework/Migrations/20221113175434_quali.Designer.cs
generated
Normal file
124
Apollon.EntityFramework/Migrations/20221113175434_quali.Designer.cs
generated
Normal file
@@ -0,0 +1,124 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Apollon.EntityFramework;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Apollon.EntityFramework.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
[Migration("20221113175434_quali")]
|
||||
partial class quali
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "6.0.8")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
|
||||
|
||||
modelBuilder.Entity("Apollon.EntityFramework.DTOs.CompetitionDto", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
|
||||
|
||||
b.Property<string>("CompetitionImage")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CompetitionName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Competition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Apollon.EntityFramework.DTOs.NameListDto", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Birthday")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Country")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("FirstName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("LastName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("PassNumber")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Qualification")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Society")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("SocietyNumber")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("NameList");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Apollon.EntityFramework.DTOs.TournamentDto", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Competition")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CompetitionImage")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("EndDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Location")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Logo")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Organisation")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Rounds")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("StartDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("Targets")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("TournamentName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Tournaments");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
26
Apollon.EntityFramework/Migrations/20221113175434_quali.cs
Normal file
26
Apollon.EntityFramework/Migrations/20221113175434_quali.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Apollon.EntityFramework.Migrations
|
||||
{
|
||||
public partial class quali : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "Qualification",
|
||||
table: "NameList",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Qualification",
|
||||
table: "NameList");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,60 @@ namespace Apollon.EntityFramework.Migrations
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
|
||||
|
||||
modelBuilder.Entity("Apollon.EntityFramework.DTOs.CompetitionDto", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
|
||||
|
||||
b.Property<string>("CompetitionImage")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CompetitionName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Competition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Apollon.EntityFramework.DTOs.NameListDto", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Birthday")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Country")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("FirstName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("LastName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("PassNumber")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Qualification")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Society")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("SocietyNumber")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("NameList");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Apollon.EntityFramework.DTOs.TournamentDto", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
@@ -52,6 +106,9 @@ namespace Apollon.EntityFramework.Migrations
|
||||
b.Property<DateTime>("StartDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("Targets")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("TournamentName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
|
||||
@@ -33,7 +33,8 @@ namespace Apollon.EntityFramework.Queries
|
||||
y.Society,
|
||||
y.SocietyNumber,
|
||||
y.Birthday,
|
||||
y.Country));
|
||||
y.Country,
|
||||
y.Qualification));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,8 @@ namespace Apollon.EntityFramework.Queries
|
||||
y.StartDate,
|
||||
y.EndDate,
|
||||
y.Location,
|
||||
y.Rounds));
|
||||
y.Rounds,
|
||||
y.Targets));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +44,8 @@ namespace Apollon.WPF.Commands
|
||||
detailsViewModel.StartDate,
|
||||
detailsViewModel.EndDate,
|
||||
detailsViewModel.Location,
|
||||
detailsViewModel.Rounds);
|
||||
detailsViewModel.Rounds,
|
||||
detailsViewModel.Targets);
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
@@ -39,7 +39,8 @@ namespace Apollon.WPF.Commands
|
||||
detailsViewModel.StartDate,
|
||||
detailsViewModel.EndDate,
|
||||
detailsViewModel.Location,
|
||||
detailsViewModel.Rounds);
|
||||
detailsViewModel.Rounds,
|
||||
detailsViewModel.Targets);
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
@@ -162,6 +162,20 @@ namespace Apollon.WPF.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
private int _targets;
|
||||
public int Targets
|
||||
{
|
||||
get
|
||||
{
|
||||
return _targets;
|
||||
}
|
||||
set
|
||||
{
|
||||
_targets = value;
|
||||
OnPropertyChanged(nameof(Targets));
|
||||
}
|
||||
}
|
||||
|
||||
private bool _isSubmitting;
|
||||
public bool IsSubmitting
|
||||
{
|
||||
|
||||
@@ -33,6 +33,7 @@ namespace Apollon.WPF.ViewModels
|
||||
EndDate = tournament.EndDate,
|
||||
Location = tournament.Location,
|
||||
Rounds = tournament.Rounds,
|
||||
Targets = tournament.Targets,
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -105,5 +105,19 @@ namespace Apollon.WPF.ViewModels
|
||||
OnPropertyChanged(nameof(Country));
|
||||
}
|
||||
}
|
||||
|
||||
private int _qualification;
|
||||
public int Qualification
|
||||
{
|
||||
get
|
||||
{
|
||||
return _qualification;
|
||||
}
|
||||
set
|
||||
{
|
||||
_qualification = value;
|
||||
OnPropertyChanged(nameof(Qualification));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ using System.Windows.Input;
|
||||
|
||||
namespace Apollon.WPF.ViewModels
|
||||
{
|
||||
public class NavigationBarViewModel : ViewModelBase
|
||||
public class NavBarTournamentDetailsViewModel : ViewModelBase
|
||||
{
|
||||
public ICommand NavigateNameListCommand { get;}
|
||||
public ICommand GroupsCommand { get;}
|
||||
@@ -25,8 +25,9 @@ namespace Apollon.WPF.ViewModels
|
||||
public string EndDate => SelectedTournament?.EndDate.ToString("d") ?? "kein Datum";
|
||||
public string Location => SelectedTournament?.Location ?? "kein Ort";
|
||||
public int Rounds => SelectedTournament?.Rounds ?? 0;
|
||||
public int Targets => SelectedTournament?.Targets ?? 0;
|
||||
|
||||
public ICommand NavigateNavBarCommand { get; }
|
||||
public ICommand NavigateTournamentDetailsCommand { get; }
|
||||
|
||||
public OverviewDetailsViewModel(SelectedTournamentsStore selectedTournamentStore, NavigationStore navigationStore, ModalNavigationStore modalNavigationStore,TournamentsStore tournamentsStore)
|
||||
{
|
||||
@@ -34,7 +35,7 @@ namespace Apollon.WPF.ViewModels
|
||||
|
||||
_selectedTournamentStore.SelectedTournamentChanged += SelectedTournamentStore_SelectedTournamentChanged;
|
||||
|
||||
NavigateNavBarCommand = new NavigateCommand<TournamentDetailsViewModel>(navigationStore, () => new TournamentDetailsViewModel(navigationStore, selectedTournamentStore, modalNavigationStore, tournamentsStore));
|
||||
NavigateTournamentDetailsCommand = new NavigateCommand<TournamentDetailsViewModel>(navigationStore, () => new TournamentDetailsViewModel(navigationStore, selectedTournamentStore, modalNavigationStore, tournamentsStore));
|
||||
}
|
||||
|
||||
protected override void Dispose()
|
||||
@@ -57,6 +58,7 @@ namespace Apollon.WPF.ViewModels
|
||||
OnPropertyChanged(nameof(EndDate));
|
||||
OnPropertyChanged(nameof(Location));
|
||||
OnPropertyChanged(nameof(Rounds));
|
||||
OnPropertyChanged(nameof(Targets));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ namespace Apollon.WPF.ViewModels
|
||||
public string EndDate => SelectedTournament?.EndDate.ToString("d") ?? "kein Datum";
|
||||
public string Location => SelectedTournament?.Location ?? "kein Ort";
|
||||
public int Rounds => SelectedTournament?.Rounds ?? 0;
|
||||
public int Targets => SelectedTournament?.Targets ?? 0;
|
||||
|
||||
public ICommand NavigateOverviewCommand { get; }
|
||||
public TournamentDetailsViewModel(NavigationStore navigationStore, SelectedTournamentsStore selectedTournamentsStore, ModalNavigationStore modalNavigationStore, TournamentsStore tournamentsStore)
|
||||
|
||||
@@ -144,8 +144,10 @@
|
||||
HorizontalAlignment="Left"
|
||||
VerticalContentAlignment="Center"
|
||||
Background="LightGray"/>
|
||||
<TextBox Grid.Row="6"
|
||||
<WrapPanel Grid.Row="6"
|
||||
Grid.Column="1"
|
||||
VerticalAlignment="Center">
|
||||
<TextBox
|
||||
Text="{Binding Rounds}"
|
||||
FontFamily="Arial"
|
||||
FontSize="16"
|
||||
@@ -154,6 +156,21 @@
|
||||
VerticalContentAlignment="Center"
|
||||
HorizontalAlignment="Left"
|
||||
Background="LightGray"/>
|
||||
<TextBlock
|
||||
Margin="50 0 0 0"
|
||||
Text="Anzahl der Scheiben: "
|
||||
Style="{StaticResource ModalTextBlock}"/>
|
||||
<TextBox
|
||||
Text="{Binding Targets}"
|
||||
FontFamily="Arial"
|
||||
FontSize="16"
|
||||
Height="30"
|
||||
Width="50"
|
||||
VerticalContentAlignment="Center"
|
||||
HorizontalAlignment="Left"
|
||||
Background="LightGray"/>
|
||||
</WrapPanel>
|
||||
|
||||
|
||||
<TextBlock Text="{Binding ErrorMessage}"
|
||||
Grid.Row="7"
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
</Image>
|
||||
</WrapPanel>
|
||||
|
||||
<WrapPanel Margin="10" HorizontalAlignment="Center">
|
||||
<WrapPanel Margin="5" HorizontalAlignment="Center">
|
||||
<TextBlock Text="{Binding StartDate}"
|
||||
TextAlignment="Center"
|
||||
FontFamily="Arial"
|
||||
@@ -198,7 +198,7 @@
|
||||
FontWeight="Bold"
|
||||
FontSize="14"
|
||||
Foreground="#0000a0"
|
||||
Margin="10">
|
||||
Margin="5">
|
||||
<TextBlock.Style>
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="Visibility" Value="Hidden"/>
|
||||
@@ -216,7 +216,7 @@
|
||||
FontWeight="Bold"
|
||||
FontSize="14"
|
||||
Foreground="#0000a0"
|
||||
Margin="10">
|
||||
Margin="5">
|
||||
<TextBlock.Style>
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="Visibility" Value="Hidden"/>
|
||||
@@ -233,7 +233,43 @@
|
||||
FontWeight="Bold"
|
||||
FontSize="14"
|
||||
Foreground="#0000a0"
|
||||
Margin="10">
|
||||
Margin="5">
|
||||
<TextBlock.Style>
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="Visibility" Value="Hidden"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding HasSelectedTournament}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</TextBlock.Style>
|
||||
</TextBlock>
|
||||
</WrapPanel>
|
||||
<WrapPanel HorizontalAlignment="Center">
|
||||
<TextBlock Text="Anzahl der Scheiben:"
|
||||
FontFamily="Arial"
|
||||
FontWeight="Bold"
|
||||
FontSize="14"
|
||||
Foreground="#0000a0"
|
||||
Margin="5">
|
||||
<TextBlock.Style>
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="Visibility" Value="Hidden"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding HasSelectedTournament}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</TextBlock.Style>
|
||||
</TextBlock>
|
||||
<TextBlock Text="{Binding Targets}"
|
||||
FontFamily="Arial"
|
||||
FontWeight="Bold"
|
||||
FontSize="14"
|
||||
Foreground="#0000a0"
|
||||
Margin="5">
|
||||
<TextBlock.Style>
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="Visibility" Value="Hidden"/>
|
||||
@@ -247,13 +283,13 @@
|
||||
</TextBlock>
|
||||
</WrapPanel>
|
||||
<Button
|
||||
Content="Turnier öffnen"
|
||||
FontSize="16"
|
||||
Height="40"
|
||||
Content="Turnier vorbereiten"
|
||||
FontSize="14"
|
||||
Height="35"
|
||||
Width="150"
|
||||
Margin="20"
|
||||
Margin="10"
|
||||
Cursor="Hand"
|
||||
Command="{Binding NavigateNavBarCommand}">
|
||||
Command="{Binding NavigateTournamentDetailsCommand}">
|
||||
<Button.Style>
|
||||
<Style TargetType="Button" BasedOn="{StaticResource ModernButton}">
|
||||
<Setter Property="Visibility" Value="Hidden"/>
|
||||
@@ -265,6 +301,44 @@
|
||||
</Style>
|
||||
</Button.Style>
|
||||
</Button>
|
||||
<Button
|
||||
Content="Turnier durchführen"
|
||||
FontSize="14"
|
||||
Height="35"
|
||||
Width="150"
|
||||
Margin="10"
|
||||
Cursor="Hand"
|
||||
Command="{Binding NavigateNavBarCommand}">
|
||||
<Button.Style>
|
||||
<Style TargetType="Button" BasedOn="{StaticResource ModernButton}">
|
||||
<Setter Property="Visibility" Value="Hidden"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding HasSelectedTournament}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Button.Style>
|
||||
</Button>
|
||||
<Button
|
||||
Content="Turnier abschließen"
|
||||
FontSize="14"
|
||||
Height="35"
|
||||
Width="150"
|
||||
Margin="10"
|
||||
Cursor="Hand"
|
||||
Command="{Binding NavigateNavBarCommand}">
|
||||
<Button.Style>
|
||||
<Style TargetType="Button" BasedOn="{StaticResource ModernButton}">
|
||||
<Setter Property="Visibility" Value="Hidden"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding HasSelectedTournament}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Button.Style>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
<DataGridTextColumn Width="150" Header="Verein" Binding="{Binding Society}" />
|
||||
<DataGridTextColumn Width="120" Header="Vereinsnummer" Binding="{Binding SocietyNumber}"/>
|
||||
<DataGridTextColumn Width="100" Header="Geburtsdatum" Binding="{Binding Birthday}" />
|
||||
<DataGridTextColumn Header="Bundesland" Binding="{Binding Country}"/>
|
||||
<DataGridTextColumn Header="Bundesland" Binding="{Binding Country}"/>
|
||||
<DataGridTextColumn Header="Qualifikation" Binding="{Binding Qualification}"/>
|
||||
</DataGrid.Columns>
|
||||
|
||||
</DataGrid>
|
||||
|
||||
Reference in New Issue
Block a user