package com.template.mapper;

import com.template.model.pojo.SmartDataClass;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.template.model.pojo.SmartDataSource;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * <p>
 * 数据源类别 Mapper 接口
 * </p>
 *
 * @author ceshi
 * @since 2023-12-05
 */
@Repository
public interface SmartDataClassMapper extends BaseMapper<SmartDataClass> {

    @Select(" SELECT " +
            "    COUNT(*) " +
            " FROM " +
            "    smart_data_source " +
            " WHERE " +
            "    ds_cls_id = #{id}")
    int checkDataSourceExist(int id);
}
