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 IEquipmentService : IDependency
    {
        /// <summary>
        /// 获取设备分页列表
        /// </summary>
        /// <param name="equipmentName">设备名称</param>
        /// <param name="equipmentCode">设备编号</param>
        /// <param name="equipmentType">设备类型</param>
        /// <param name="activated">是否启用</param>
        /// <param name="page">当前页</param>
        /// <param name="size">页大小</param>
        /// <returns></returns>
        Result<PagedList<EquipmentInfo>> GetEquipmentPageList(string equipmentName = "", string equipmentCode = "", string equipmentType = "", bool? activated = true, int page = 1, int size = 20);

        /// <summary>
        /// 获取设备列表
        /// </summary>
        /// <param name="equipmentName">设备名称</param>
        /// <param name="equipmentCode">设备编号</param>
        /// <param name="equipmentType">设备类型</param>
        /// <param name="activated">是否启用</param>
        Result<List<EquipmentInfo>> GetEquipmentList(string equipmentName = "", string equipmentCode = "", string equipmentType = "", bool? activated = true);

        /// <summary>
        /// 获取设备明显
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Result<EquipmentInfo> GetEquipmentDetail(string id);

        /// <summary>
        /// 添加设备信息
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        Result AddEquipment(EquipmentInfo info);

        /// <summary>
        /// 更新设备信息
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        Result UpdateEquipment(EquipmentInfo info);

        /// <summary>
        /// 删除设备信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Result DeleteEquipment(string id);
    }
}
