package com.gameplatform.server.mapper.admin;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gameplatform.server.model.entity.admin.SystemConfig;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SystemConfigMapper extends BaseMapper<SystemConfig> {
    SystemConfig findById(@Param("id") Long id);
    
    SystemConfig findByKey(@Param("configKey") String configKey);
    
    List<SystemConfig> findByType(@Param("configType") String configType);
    
    List<SystemConfig> findAll(@Param("size") int size,
                              @Param("offset") int offset);
    
    long countAll();
    
    int insert(SystemConfig systemConfig);
    
    int update(SystemConfig systemConfig);
    
    int deleteById(@Param("id") Long id);
    
    int deleteByKey(@Param("configKey") String configKey);
}
