using System.Collections.Generic;
using System.Threading.Tasks;
using ASHermed.SinoInterface.Api.ContractModel.BlindBox.Dto;
using ASHermed.SinoInterface.Api.ContractModel.BlindBox.Entity;

namespace ASHermed.SinoInterface.Api.IRepository.BlindBox
{
    /// <summary>
    /// 盲盒活动仓储
    /// </summary>
    public interface IBlindBoxRepository
    {
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="pubBlindBox"></param>
        /// <returns></returns>
        Task<int> AddAsync(PubBlindBox pubBlindBox);

        /// <summary>
        /// 查询用户的领取次数
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        Task<int> GetCountByUserIdAsync(int userId);

        /// <summary>
        /// 列表查询
        /// </summary>
        /// <param name="hosId">诊所id</param>
        /// <param name="searchText"></param>
        /// <returns></returns>
        Task<List<BlindBoxDto>> QueryAsync(int hosId, string searchText = null);
    }
}