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 string Campaign { get; private set; }
        public string UserId { get; private set; }

        public BaseCommand(string sessionName, string userId)
        {
            Timestamp = DateTimeOffset.Now.ToUnixTimeMilliseconds();
            SessionName = sessionName;
            UserId = userId;
        }

        public BaseCommand(string campaign, string sessionName, string userId)
        {
            Timestamp = DateTimeOffset.Now.ToUnixTimeMilliseconds();
            SessionName = sessionName;
            Campaign = campaign;
            UserId = userId;
        }
    }
}
