package cc.smtweb.system.bpm.web.sys.base.dict;

import cc.smtweb.framework.core.annotation.SwCache;
import cc.smtweb.framework.core.cache.AbstractEntityCache;
import cc.smtweb.framework.core.cache.CacheManager;

/**
 * Created by 1 at 2022-07-27 19:59:05
 * 实体【[字典类别](SYS_DICT_TYPE)】的缓存类
 */
@SwCache(ident = "SYS_DICT_TYPE", title = "字典类别")
public class DictTypeCache extends AbstractEntityCache<DictType> {
    //缓存key：按编码
    public final static String mk_code = "code";

    public static DictTypeCache getInstance() {
        return CacheManager.getIntance().getCache(DictTypeCache.class);
    }

    public DictTypeCache() {
        //缓存key：按编码
        regMap(mk_code, "sdct_code");
    }

    //缓存key：按编码
    public final DictType getByCode(String key) {
        return getByKey(mk_code, key);
    }
}
