001package cn.mybatis.mp.generator.config;
002
003import cn.mybatis.mp.core.mvc.Dao;
004import lombok.Getter;
005
006@Getter
007public class DaoConfig {
008
009    /**
010     * dao接口父类
011     */
012    private String superClass = Dao.class.getName();
013
014    /**
015     * 是否启用
016     */
017    private boolean enable = true;
018
019    /**
020     * 启用泛型
021     */
022    private boolean generic = true;
023
024    /**
025     * 实体类包名
026     */
027    private String packageName = "dao";
028
029    /**
030     * dao接口后缀
031     */
032    private String suffix = "Dao";
033
034
035    /**
036     * dao接口父类
037     */
038    public DaoConfig superClass(String superClass) {
039        this.superClass = superClass;
040        return this;
041    }
042
043    /**
044     * 设置是否启用
045     */
046    public DaoConfig enable(boolean enable) {
047        this.enable = enable;
048        return this;
049    }
050
051    /**
052     * 启用泛型
053     */
054    public DaoConfig generic(boolean generic) {
055        this.generic = generic;
056        return this;
057    }
058
059
060    /**
061     * 实体类包名
062     */
063    public DaoConfig packageName(String packageName) {
064        this.packageName = packageName;
065        return this;
066    }
067
068    /**
069     * dao接口后缀
070     */
071    public DaoConfig suffix(String suffix) {
072        this.suffix = suffix;
073        return this;
074    }
075}