migrating session/map it to guid.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
155cb4ea9a
commit
195533bce0
17 changed files with 672 additions and 82 deletions
|
@ -7,7 +7,7 @@ namespace Sledgemapper.Api.Commands
|
|||
{
|
||||
public double Timestamp { get; private set; }
|
||||
public string SessionName { get; private set; }
|
||||
public string Campaign { get; private set; }
|
||||
public Guid Campaign { get; private set; }
|
||||
public string UserId { get; private set; }
|
||||
|
||||
public BaseCommand(string sessionName, string userId)
|
||||
|
@ -18,6 +18,14 @@ namespace Sledgemapper.Api.Commands
|
|||
}
|
||||
|
||||
public BaseCommand(string campaign, string sessionName, string userId)
|
||||
{
|
||||
Timestamp = DateTimeOffset.Now.ToUnixTimeMilliseconds();
|
||||
SessionName = sessionName;
|
||||
Campaign = new Guid(campaign);
|
||||
UserId = userId;
|
||||
}
|
||||
|
||||
public BaseCommand(Guid campaign, string sessionName, string userId)
|
||||
{
|
||||
Timestamp = DateTimeOffset.Now.ToUnixTimeMilliseconds();
|
||||
SessionName = sessionName;
|
||||
|
|
19
Sledgemapper.Api/Commands/NewCampaignCommand.cs
Normal file
19
Sledgemapper.Api/Commands/NewCampaignCommand.cs
Normal file
|
@ -0,0 +1,19 @@
|
|||
using System;
|
||||
using MediatR;
|
||||
|
||||
namespace Sledgemapper.Api.Commands
|
||||
{
|
||||
public class NewCampaignCommand : IRequest<bool>
|
||||
{
|
||||
public double Timestamp { get; private set; }
|
||||
public string CampaignName { get; private set; }
|
||||
public string UserId { get; private set; }
|
||||
public NewCampaignCommand(string campaingName, string userId)
|
||||
{
|
||||
Timestamp = DateTimeOffset.Now.ToUnixTimeMilliseconds();
|
||||
CampaignName = campaingName;
|
||||
UserId = userId;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
using Sledgemapper.Shared.Entities;
|
||||
using System;
|
||||
|
||||
namespace Sledgemapper.Api.Commands
|
||||
{
|
||||
|
@ -6,7 +7,7 @@ namespace Sledgemapper.Api.Commands
|
|||
{
|
||||
public Overlay Overlay { get; private set; }
|
||||
|
||||
public NewOverlayCommand(string campaignId, string mapId, Overlay overlay, string userId) : base(campaignId, mapId, userId)
|
||||
public NewOverlayCommand(Guid campaignId, string mapId, Overlay overlay, string userId) : base(campaignId, mapId, userId)
|
||||
{
|
||||
Overlay = overlay;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
using System;
|
||||
using MediatR;
|
||||
|
||||
namespace Sledgemapper.Api.Commands
|
||||
{
|
||||
public class NewSessionCommand : BaseCommand<bool>
|
||||
|
@ -10,17 +7,4 @@ namespace Sledgemapper.Api.Commands
|
|||
}
|
||||
}
|
||||
|
||||
public class NewCampaignCommand : IRequest<bool>
|
||||
{
|
||||
public double Timestamp { get; private set; }
|
||||
public string CampaignName { get; private set; }
|
||||
public string UserId { get; private set; }
|
||||
public NewCampaignCommand(string campaingName, string userId)
|
||||
{
|
||||
Timestamp = DateTimeOffset.Now.ToUnixTimeMilliseconds();
|
||||
CampaignName = campaingName;
|
||||
UserId = userId;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue