ready for database

This commit is contained in:
Natlinux81
2022-08-20 01:41:56 +02:00
parent fcd1d90292
commit 68f0cec9d0
28 changed files with 356 additions and 36 deletions

View File

@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,14 @@
using Apollon.Domain.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Apollon.Domain.Commands
{
public interface ICreateTournamentCommand
{
Task Execute(Tournament tournament);
}
}

View File

@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Apollon.Domain.Commands
{
public interface IDeleteTournamentCommand
{
Task Execute (Guid id);
}
}

View File

@@ -0,0 +1,14 @@
using Apollon.Domain.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Apollon.Domain.Commands
{
public interface IUpdateTournamentCommand
{
Task Execute(Tournament tournament);
}
}

View File

@@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Apollon.Domain.Models
{
public class Tournament
{
public Guid Id { get; }
public string Organisation { get; }
public string TournamentName { get; }
public string Competition { get; }
public DateTime StartDate { get; }
public DateTime EndDate { get; }
public string Location { get; }
public int Rounds { get; }
public Tournament(Guid id, string organisation, string tournamentName, string competition, DateTime startDate, DateTime endDate, string location, int rounds = 0)
{
Id = id;
Organisation = organisation;
TournamentName = tournamentName;
Competition = competition;
StartDate = startDate;
EndDate = endDate;
Location = location;
Rounds = rounds;
}
}
}

View File

@@ -0,0 +1,14 @@
using Apollon.Domain.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Apollon.Domain.Queries
{
public interface IGetAllTournamentsQuery
{
Task<IEnumerable<Tournament>> Execute();
}
}