package com.mortals.xhx.module.device.service;

import com.mortals.framework.common.Rest;
import com.mortals.framework.model.Context;
import com.mortals.framework.service.ICRUDCacheService;
import com.mortals.xhx.module.device.dao.DeviceDao;
import com.mortals.xhx.module.device.model.DeviceEntity;

/**
 * DeviceService
 * <p>
 * 设备 service接口
 *
 * @author zxfei
 * @date 2023-02-25
 */
public interface DeviceService extends ICRUDCacheService<DeviceEntity, Long> {

    DeviceDao getDao();


    Rest<DeviceEntity> deviceInfoByCode(String deviceCode, Context context);

    /**
     * 设备激活
     *
     * @param deviceCode
     * @param context
     */
    void active(String deviceCode, Context context);

    /**
     * 设备启用停用
     *
     * @param id
     * @param context
     */
    void deviceEnabled(Long id, Integer status, Context context);
}