using Masuit.Tools.Models;
using Masuit.Tools;
using PVDEMCS.Common;
using PVDEMCS.Common.DI;
using PVDEMCS.Services.Repositories.Entities;
using PVDEMCS.Services.Models;

namespace PVDEMCS.Services.Repositories
{
    /// <summary>
    /// 系统参数设置 数据层 接口
    /// </summary>
    public interface ISysConfigRepository : IDependency
    {
        /// <summary>
        /// 获取系统参数设置分页列表
        /// </summary>
        /// <param name="configName">参数名称</param>
        /// <param name="configKey">参数键值</param>
        /// <param name="page">当前页</param>
        /// <param name="size">页大小</param>
        /// <returns></returns>
        Result<PagedList<SysConfig>> GetSysConfigPageList(string configName, string configKey, int page, int size);

        /// <summary>
        /// 获取系统参数设置列表
        /// </summary>
        /// <param name="configName">参数名称</param>
        /// <param name="configKey">参数键值</param>
        /// <returns></returns>
        Result<List<SysConfig>> GetSysConfigList(string configName, string configKey);

        /// <summary>
        /// 获取获取系统参数设置明细
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Result<SysConfigEntity> GetSysConfigDetailById(string id);

        /// <summary>
        /// 获取获取系统参数设置明细
        /// </summary>
        /// <param name="name"></param>
        /// <param name="key"></param>
        /// <returns></returns>
        Result<SysConfigEntity> GetSysConfigDetailNameOrKey(string name, string key = "");

        /// <summary>
        /// 添加系统参数设置
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        Result AddSysConfig(SysConfigEntity entity);

        /// <summary>
        /// 更新系统参数设置
        /// </summary>
        /// <param name="entity"></param>

        Result UpdateSysConfig(SysConfigEntity entity);

        /// <summary>
        /// 删除系统参数设置
        /// </summary>
        /// <param name="id"></param>
        Result DeleteSysConfig(string id);
    }
}
