using Nirvana.Common;
using Nirvana.Common.ApiBase;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using YBDevice.Application.DeviceInfo;
using YBDevice.Entity;

namespace YBDevice.Application
{
    /// <summary>
    /// 设备管理
    /// </summary>
    public interface IDeviceService
    {
        /// <summary>
        /// 设备列表
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        Task<PageParms<DeviceListModel>> GetListAsync(QueryParams param);

        /// <summary>
        /// 信息编辑
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<ResultInfo> SubmitAsync(YB_Device model);

        /// <summary>
        /// 设备详情
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<YB_Device> DetailAsync(int id);

        /// <summary>
        /// 设备类型列表
        /// </summary>
        /// <returns></returns>
        Task<List<YB_DeviceType>> GetTypeListAsync();

        /// <summary>
        /// 设备类型列表
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
       Task<PageParms<YB_DeviceType>> GetTypeListAsync(QueryParams param);
        /// <summary>
        /// 设备类型详情
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<YB_DeviceType> TypeDetailAsync(int id);

        /// <summary>
        /// 信息编辑
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<ResultInfo> SubmitTypeAsync(YB_DeviceType model);

        /// <summary>
        /// 设备批量操作
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
       Task<ResultInfo> BatchSetAsync(DeviceBatchModel data);
        /// <summary>
        /// 设备停用/启用
        /// </summary>
        /// <param name="id"></param>
        /// <param name="status">0-停用,1-启用</param>
        /// <returns></returns>
        Task<ResultInfo> StopDevAsync(int id, DeviceStatus status);
        /// <summary>
        /// 设备类型关联的小程序列表
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        Task<ResultInfo> GetDeviceAppListAsync(QueryParams param);
        /// <summary>
        /// 设备类型关联的小程序提交
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task<ResultInfo> SubmitDeviceAppAsync(DeviceAppC2SDto data);
        /// <summary>
        /// 设备类型关联的小程序删除
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task<ResultInfo> DeleteDeviceAppAsync(DeviceAppDeleteC2SDto data);
        /// <summary>
        /// 设备类型关联的小程序详情
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<YB_DeviceTypeApp> GetDeviceAppAsync(Guid id);
        /// <summary>
        /// 查询设备分配记录
        /// </summary>
        /// <param name="id">设备ID</param>
        /// <returns></returns>
        Task<List<DeviceAllocListSCDto>> GetDeviceAllocListAsync(int id);
    }
}
