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 IEquipmentRepository : 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, int page, int size);

        /// <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);

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

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

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

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