package com.test.bijihoudaun.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.test.bijihoudaun.entity.ImageName;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Delete;

@Mapper
public interface ImageNameMapper extends BaseMapper<ImageName> {
    // 可以在这里添加自定义方法
    
    /**
     * 根据文件名删除记录
     * @param fileName 文件名
     * @return 删除的记录数
     */
    @Delete("DELETE FROM `image_name` WHERE file_name = #{fileName}")
    int deleteByFileName(String fileName);
}