using Bp.Sync.Dto.Results;
using MediatR;
using System.Threading.Tasks;

namespace Bp.Sync.BackEnd.Factories
{
    public interface IDailyTaskFactory
    {
        Task<BaseResult> BuildInventoryDiary();
    }

    public class DailyTaskFactory : IDailyTaskFactory
    {
        private readonly IMediator _mediator;
        public DailyTaskFactory(IMediator mediator)
        {
            _mediator = mediator;
        }

        public async Task<BaseResult> BuildInventoryDiary()
        {
            return await _mediator.Send(new Application.Commands.DailyTasks.InventoryDiaries.AddDailyTaskCommand());
        }
        

    }
}
