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

namespace CVDEMCS.Services
{
    /// <summary>
    /// 系统参数设置 服务层 接口
    /// </summary>
    public interface ISysConfigService : 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<SysConfig> GetSysConfigDetailById(string id);

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

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

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

        Result UpdateSysConfig(SysConfig info);

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