package com.mvc.service.app;

public enum SetupImageType {
    Env1("11","环境照片1"),
    Env2("12","环境照片2"),
    Env3("13","环境照片3"),
    Dail("21","水表表盘照片"),
    Side("31","水表侧边照片"),
    ;

    private String flag;
    private String desc;

    private SetupImageType(String type,String desc){
        this.flag = type;
        this.desc = desc;
    }

    public String getFlag() {
        return flag;
    }

    public void setFlag(String flag) {
        this.flag = flag;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static SetupImageType getImageTypeByFlag(String flag){
        for(SetupImageType imageType:SetupImageType.values()){
            if(imageType.flag.equals(flag)){
                return imageType;
            }
        }
        return null;
    }

}
