using BukiVedi.Shared.Entities;

namespace BukiVedi.Shared.Models
{
    /// <summary>
    /// Контекст исполнения операций
    /// </summary>
    public sealed class OperationContext
    {
        /// <summary>
        /// Данные аккаунтов
        /// </summary>
        public IAuthProvider AuthProvider { get; }
        /// <summary>
        /// Временная отметка начала операции
        /// </summary>
        public long StartOperationTimestamp { get; }
        /// <summary>
        /// Инициатор операции
        /// </summary>
        public Member OperationInitiator { get; private set; }

        public OperationContext(IAuthProvider authProvider, long startOperationTimestamp)
        {
            AuthProvider = authProvider;
            StartOperationTimestamp = startOperationTimestamp;

        }

        public async Task SetAccount(Member operationInitiator)
        {
            OperationInitiator = operationInitiator;
        }
    }
}
