using DapperORM.Common.Models;
using PushInfo.Core.Models.Tables;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace PushInfo.Core.IDAL
{
    /// <summary>
    /// 项目推送映射表
    /// </summary>
    internal interface IMapProjectPushDAL
    {
        /// <summary>
        /// 查询单条记录
        /// </summary>
        /// <param name="where"></param>
        /// <param name="select"></param>
        /// <param name="sort"></param>
        /// <returns></returns>
        ResultModel<Map_Project_Push> GetModel(Expression<Func<Map_Project_Push, bool>> where = null, Expression<Func<Map_Project_Push, object>> select = null, IDictionary<string, bool> sort = null);

        Map_Project_Push GetModel(string Id);

        Map_Project_Push GetModel(string sysPushId,string projectId);

        /// <summary>
        /// 查询集合
        /// </summary>
        /// <param name="where">查询条件</param>
        /// <param name="select">查询字段</param>
        /// <param name="sort">排序</param>
        /// <returns></returns>
        ResultModel<IEnumerable<Map_Project_Push>> GetList(Expression<Func<Map_Project_Push, bool>> where = null, Expression<Func<Map_Project_Push, object>> select = null, IDictionary<string, bool> sort = null);
        
        /// <summary>
        /// 查询集合
        /// </summary>
        /// <param name="sqlStr">查询sql语句</param>
        /// <returns></returns>
        ResultModel<IEnumerable<Map_Project_Push>> GetList(string sqlStr, Dictionary<string, object> param);

        /// <summary>
        /// 更新配置表数据
        /// </summary>
        /// <param name="drugRandom">修改后的药物编号model</param>
        /// <returns></returns>
        ResultModel Update(Map_Project_Push model, Expression<Func<Map_Project_Push, object>> updateExp, Expression<Func<Map_Project_Push, bool>> whereExp);
    }
}
