sledgemapper/Sledgemapper.Api/Commands/BaseCommand.cs
Michele Scandura 0a4b8ebeb2 progress
2020-11-17 15:16:14 +00:00

28 lines
743 B
C#

using MediatR;
using System;
namespace Sledgemapper.Api.Commands
{
public abstract class BaseCommand<T> : IRequest<T>
{
public double Timestamp { get; private set; }
public string SessionName { get; private set; }
public int UserId { get; set; }
public int SessionId {get;set;}
public BaseCommand(string sessionName, int userId)
{
Timestamp = DateTimeOffset.Now.ToUnixTimeMilliseconds();
SessionName = sessionName;
UserId=userId;
}
public BaseCommand(int sessionId, int userId)
{
Timestamp = DateTimeOffset.Now.ToUnixTimeMilliseconds();
SessionId = sessionId;
UserId=userId;
}
}
}