ready for database
This commit is contained in:
9
Apollon.Domain/Apollon.Domain.csproj
Normal file
9
Apollon.Domain/Apollon.Domain.csproj
Normal file
@@ -0,0 +1,9 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
14
Apollon.Domain/Commands/ICreateTournamentCommand.cs
Normal file
14
Apollon.Domain/Commands/ICreateTournamentCommand.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
13
Apollon.Domain/Commands/IDeleteTournamentCommand .cs
Normal file
13
Apollon.Domain/Commands/IDeleteTournamentCommand .cs
Normal 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);
|
||||
}
|
||||
}
|
||||
14
Apollon.Domain/Commands/IUpdateTournamentCommand .cs
Normal file
14
Apollon.Domain/Commands/IUpdateTournamentCommand .cs
Normal 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);
|
||||
}
|
||||
}
|
||||
32
Apollon.Domain/Models/Tournament.cs
Normal file
32
Apollon.Domain/Models/Tournament.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
14
Apollon.Domain/Queries/IGetAllTournamentsQuery.cs
Normal file
14
Apollon.Domain/Queries/IGetAllTournamentsQuery.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user