sledgemapper/Sledgemapper.Api/Commands/NewSessionCommand.cs
2021-02-20 00:18:07 +00:00

36 lines
No EOL
982 B
C#

using System;
using System.Collections.Generic;
using MediatR;
namespace Sledgemapper.Api.Commands
{
public class NewSessionCommand : BaseCommand<bool>
{
public NewSessionCommand(string sessionName, int userId) : base(sessionName, userId)
{
}
}
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;
}
}
public class GetCampaignsCommand : IRequest<List<Core.Entities.Campaign>>
{
public string UserId { get; private set; }
public GetCampaignsCommand(string userId)
{
UserId = userId;
}
}
}