package cc.smtweb.framework.core.db.vo;

import lombok.Data;

/**
 * 表缓存信息定义：{"name":"tn","title":"按表名","fields":"table_name","type":"M"}
 * Created by Akmm at 2022/2/21 16:22
 */
@Data
public class ModelCache {
    //按map缓存
    public static String CACHE_TYPE_MAP = "M";
    //按list缓存
    public static String CACHE_TYPE_LIST = "L";

    //缓存名，根据此名称去获取缓存信息 getByKey的参数
    private String name;
    //缓存中文名，给人看的
    private String title;
    //字段，多个字段，键值以下划线分隔
    private String fields;
    //缓存类别：list/map
    private String type;

    public boolean isMapType() {
        return CACHE_TYPE_MAP.equalsIgnoreCase(type);
    }
}
