001package cn.mybatis.mp.generator.config;
002
003import cn.mybatis.mp.core.mybatis.mapper.MybatisMapper;
004import lombok.Getter;
005
006@Getter
007public class MapperConfig {
008
009    /**
010     * Mapper接口父类
011     */
012    private String superClass = MybatisMapper.class.getName();
013
014    /**
015     * 是否使用 @Mapper
016     */
017    private boolean mapperAnnotation = true;
018
019    /**
020     * mapper接口包名
021     */
022    private String packageName = "mapper";
023
024    /**
025     * mapper接口后缀
026     */
027    private String suffix = "Mapper";
028
029
030    /**
031     * Mapper接口父类
032     */
033    public MapperConfig superClass(String superClass) {
034        this.superClass = superClass;
035        return this;
036    }
037
038    /**
039     * 是否使用 @Mapper
040     */
041    public MapperConfig mapperAnnotation(boolean mapperAnnotation) {
042        this.mapperAnnotation = mapperAnnotation;
043        return this;
044    }
045
046    /**
047     * mapper接口包名
048     */
049    public MapperConfig packageName(String packageName) {
050        this.packageName = packageName;
051        return this;
052    }
053
054    /**
055     * mapper接口后缀
056     */
057    public MapperConfig suffix(String suffix) {
058        this.suffix = suffix;
059        return this;
060    }
061}