using Knoks.Core.Entities;
using Knoks.Core.Entities.Args;
using Knoks.Core.Logic.Interfaces;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace Knoks.Core.Data.Interfaces
{
    public interface IKnokDao
    {
        Task<Knok> CreateKnok(CreateKnokArgs create, decimal currentPrice);
        Task<Knok> GetKnokDetails(long knokId, int knokFeedExpirationHours);
        Task<KnokFullData> GetKnokFullDetails(long knokId, long userId, int knokFeedExpirationHours, List<IDurationCRTAggrItem> durationCRTAggrItems);
        Task<KnokImage> CreateImage(long knokId, KnokImage image);
        Task<KnokImage> LoadImage(long knokId, Knok knok);
        Task<IEnumerable<KnokFeed>> GetPublicKnoks(KnokFeedArgs args, int knokFeedExpirationHours);
        Task<IEnumerable<KnokOngoing>> GetAliveKnoks(KnokOngoingArgs args, List<IDurationCRTAggrItem> durationCRTAggrItems);
        Task<IEnumerable<KnokOngoing>> GetCurrentlyPublishedKnoks(KnokCurrentlyPublishedArgs args, long userId, int knokFeedExpirationHours, List<IDurationCRTAggrItem> durationCRTAggrItems);
        Task<IEnumerable<KnokEnded>> GetPastPublishedKnoks(KnokPastPublishedArgs args, long userId, List<IDurationCRTAggrItem> durationCRTAggrItems);
        Task<Knok> PublishKnok(long knokId, long userId, long accountId, decimal publishPrice, decimal knokRating);
        Task PurchaseKnok(long knokId, long userId, long accountId);
        Task<KnokOwnData> GetOwnData(long userId);
        Task<float> GetKnokPrice(long userId);
        Task<List<Knok>> GetKnoks(bool? activeOnly = null, long? greaterThanSignalId = null);
        Task<Knok> UpdateKnok(IDictionary<string, object> changes, decimal knokerWinRate, decimal userRefundRate);
        Task<KnokserProfile> GetKnokserProfile(long knokserId);
        Task<IEnumerable<KnokEnded>> GetEndedKnoks(KnokEndedArgs args, List<IDurationCRTAggrItem> durationCRTAggrItems);
    }
}