basic player management
This commit is contained in:
parent
350a283b5e
commit
bab170552e
12 changed files with 244 additions and 91 deletions
21
Sledgemapper.Api/Commands/GetCampaignPlayersCommand.cs
Normal file
21
Sledgemapper.Api/Commands/GetCampaignPlayersCommand.cs
Normal file
|
@ -0,0 +1,21 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using MediatR;
|
||||
using Sledgemapper.Shared.Entities;
|
||||
|
||||
namespace Sledgemapper.Api.Commands
|
||||
{
|
||||
public class GetCampaignPlayersCommand : IRequest<List<Player>>
|
||||
{
|
||||
public double Timestamp { get; private set; }
|
||||
public string CampaignName { get; private set; }
|
||||
public string UserId { get; private set; }
|
||||
public GetCampaignPlayersCommand(string campaingName, string userId)
|
||||
{
|
||||
Timestamp = DateTimeOffset.Now.ToUnixTimeMilliseconds();
|
||||
CampaignName = campaingName;
|
||||
UserId = userId;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
15
Sledgemapper.Api/Commands/GetCampaignsCommand.cs
Normal file
15
Sledgemapper.Api/Commands/GetCampaignsCommand.cs
Normal file
|
@ -0,0 +1,15 @@
|
|||
using System.Collections.Generic;
|
||||
using MediatR;
|
||||
|
||||
namespace Sledgemapper.Api.Commands
|
||||
{
|
||||
public class GetCampaignsCommand : IRequest<List<Core.Entities.Campaign>>
|
||||
{
|
||||
public string UserId { get; private set; }
|
||||
public GetCampaignsCommand(string userId)
|
||||
{
|
||||
UserId = userId;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
21
Sledgemapper.Api/Commands/InvitePlayerToCampaignCommand.cs
Normal file
21
Sledgemapper.Api/Commands/InvitePlayerToCampaignCommand.cs
Normal file
|
@ -0,0 +1,21 @@
|
|||
using System;
|
||||
using MediatR;
|
||||
|
||||
namespace Sledgemapper.Api.Commands
|
||||
{
|
||||
public class InvitePlayerToCampaignCommand : IRequest<bool>
|
||||
{
|
||||
public double Timestamp { get; private set; }
|
||||
public string CampaignName { get; private set; }
|
||||
public string Email { get; private set; }
|
||||
public string UserId { get; private set; }
|
||||
public InvitePlayerToCampaignCommand(string campaingName, string email, string userId)
|
||||
{
|
||||
Timestamp = DateTimeOffset.Now.ToUnixTimeMilliseconds();
|
||||
CampaignName = campaingName;
|
||||
UserId = userId;
|
||||
Email = email;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -1,5 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using MediatR;
|
||||
|
||||
namespace Sledgemapper.Api.Commands
|
||||
|
@ -24,13 +23,4 @@ namespace Sledgemapper.Api.Commands
|
|||
}
|
||||
}
|
||||
|
||||
public class GetCampaignsCommand : IRequest<List<Core.Entities.Campaign>>
|
||||
{
|
||||
public string UserId { get; private set; }
|
||||
public GetCampaignsCommand(string userId)
|
||||
{
|
||||
UserId = userId;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue