using System.Threading.Tasks;
using ASHermed.SinoInterface.Api.ContractModel.App.Entity;
using ASHermed.SinoInterface.Api.IRepository.App;
using ASHermed.SinoInterface.Repository.MySql;

namespace ASHermed.SinoInterface.Api.MySqlRepository.App
{
    public class PubUserClickRepository : BaseRepositoryToASHermed_SinoInterface<Pub_User_Click>, IPubUserClickRepository
    {
        /// <summary>
        /// 插入返回自增id
        /// </summary>
        /// <param name="pubUserClick"></param>
        /// <returns></returns>
        public async Task<int> InsertAndReturnAsync(Pub_User_Click pubUserClick)
        {
            const string sql = "insert into pub_user_click (Ip,CreateTime) values(@Ip,@CreateTime) ";

            var result = await ExecuteAsync(sql, pubUserClick);

            return result;
        }
    }
}