package com.yunfeiyun.agmp.common.constant;

public @interface ResConstants {

    public enum mediaType
    {
        IMG("图片","IMG", "1"),
        VIDEO("视频","VIDEO","2"),
        FILE("文件","FILE","10");

        private final String name;
        private final String key;
        private final String value;

        mediaType(String name ,String key,String value)
        {
            this.name = name;
            this.key = key;
            this.value = value;
        }

        public String getName() {
            return this.name;
        }

        public String getKey() {
            return this.key;
        }

        public String getValue() {
            return this.value;
        }

        public static mediaType getKey(String type) {
            for (mediaType media : mediaType.values()) {
                if (media.getKey().equals(type)) {
                    return media;
                }
            }
            return null;
        }
    }


    public enum BizType
    {
        CROP("作物","CROP","/crop"),
        LAND("基地","LAND","/land"),
        BLOCK("地块","BLOCK","/block"),
        TASKRCD("任务记录","TASKRCD","/taskrcd"),
        SUPPLY("供应商","SUPPLY","/supply"),
        SYSLINK("子系统", "SYSLINK", "/syslink"),
        AVATAR("头像","AVATAR","/avatar"),
        SYSTHEME("系统主题","SYSTHEME","/systheme"),
        TUTORIAL("教程图片","TUTORIAL","/tutorial"),
        TUTORIALVIDEO("教程视频","TUTORIAL","/tutorial"),
        POLICY("农事决策","POLICY","/policy"),
        PERIOD("生命周期","PERIOD","/period"),
        SOURCE_INFO_AVATAR("溯源信息头像","SOURCE_INFO_AVATAR","/sourceInfoAvatar"),
        SOURCE_INFO_QUALITY("溯源信息体检报告","SOURCE_INFO_QUALITY","/sourceInfoQuality"),
        SOURCE_INFO_FIGURE("溯源信息崭新形象","SOURCE_INFO_FIGURE","/sourceInfoFigure"),
        SOURCE_INFO_PERIOD("生命周期","SOURCE_INFO_PERIOD","/sourceInfoPeriod"),
        SOURCE_INFO_ENVIRONMENT("生长环境","SOURCE_ENVIRONMENT","/sourceInfoEnvironment"),
        MPPQUALITYCHECK("质检","MPPQUALITYCHECK","/mppQualityCheck"),
        FINISH_GOODS_PERIOD("加工/包装过程","FINISH_GOODS_PERIOD","/finishGoodsPeriod"),
        CUSTOMER_QUALIFICATION("客户资质图片","CUSTOMER_QUALIFICATION","/sysCustomer"),
        ;

        private final String name;
        private final String key;
        private final String path;

        BizType(String name ,String key ,  String path)
        {
            this.name = name;
            this.key = key;
            this.path = path;
        }

        public String getName() {
            return this.name;
        }

        public String getKey() {
            return this.key;
        }

        public String getPath() {
            return this.path;
        }

        public static BizType getKey(String type) {
            for (BizType biz : BizType.values()) {
                if (biz.getKey().equals(type)) {
                    return biz;
                }
            }
            return null;
        }

    }



    public enum ossType
    {
        ALIYUN("阿里云","1"),
        QCLOUD("腾讯云","2");

        private final String name;
        private final String value;

        ossType(String name ,String value)
        {
            this.name = name;
            this.value = value;
        }

        public String getName() {
            return this.name;
        }

        public String getValue() {
            return this.value;
        }

        public static String getValue(String name) {
            for (ossType oss : ossType.values()) {
                if (oss.getValue().equals(name)) {
                    return name;
                }
            }
            return null;
        }
    }


    public enum formType
    {
        QUERY("查询","QUERY","0"),
        ADD("新增","ADD", "1"),
        UPDATE("修改","UPDATE","2"),
        DELETE("删除","DELETE","3");


        private final String name;
        private final String key;
        private final String value;

        formType(String name ,String key,String value)
        {
            this.name = name;
            this.key = key;
            this.value = value;
        }

        public String getName() {
            return this.name;
        }

        public String getKey() {
            return this.key;
        }

        public String getValue() {
            return this.value;
        }

        public static mediaType getKey(String type) {
            for (mediaType media : mediaType.values()) {
                if (media.getKey().equals(type)) {
                    return media;
                }
            }
            return null;
        }
    }

}
