package com.xinelu.familydoctor.service;

import com.xinelu.familydoctor.entity.DeviceBindResident;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author gaoyu
* @description 针对表【device_bind_resident(居民设备绑定记录表)】的数据库操作Service
* @createDate 2023-09-25 16:00:00
*/
public interface DeviceBindResidentService {

    /**
     * 已绑定设备
     * @param identity 身份证号
     * @return {@link java.util.List<com.xinelu.familydoctor.entity.DeviceBindResident>}
     * @author gaoyu
     * @date 2023-9-26 9:58
     */
    List<DeviceBindResident> boundDevice(@Param("identity") String identity);
    /**
     * 设备是否重复绑定
     * @param record 参数
     * @return {@link boolean}
     * @author gaoyu
     * @date 2023-9-25 17:17
    */
    boolean repeatBind(DeviceBindResident record);
    /**
     * 绑定设备
     * @param entity 参数
     * @return {@link int}
     * @author gaoyu
     * @date 2023-9-25 16:49
    */
    int bindDevice(DeviceBindResident entity);

    /**
     * 解绑设备
     * @param entity 参数
     * @return {@link int}
     * @author gaoyu
     * @date 2023-9-26 10:14
    */
    int unbindDevice(DeviceBindResident entity);
}
