package com.jpsoft.shinestar.modules.base.dao;

import com.jpsoft.shinestar.modules.base.entity.CameraCompany;
import com.jpsoft.shinestar.modules.common.dto.Sort;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface CameraCompanyDAO {
	int insert(CameraCompany entity);
	int update(CameraCompany entity);
	int exist(String id);
	CameraCompany get(String id);
	int delete(String id);
	List<CameraCompany> list();
	List<CameraCompany> findByClassId(String classId);
	List<CameraCompany> findByCameraId(String cameraId);
	List<CameraCompany> findByCameraIdAndClassId(@Param("cameraId") String cameraId, @Param("classId") String classId);
	List<CameraCompany> search(Map<String, Object> searchParams, List<Sort> sortList);
    int existByKey(String cameraId, String companyId);
    int deleteByKey(String cameraId, String companyId);
}