package com.microservices.zone.utils;

/**
 * @author otto
 */
public class ZoneConstants {
    public final static String PROJECT_PROPERTIES_ARRAY_KEY = "array";
    public final static String PROJECT_PROPERTIES_HTTP_KEY = "http";
    public final static String ARRAY_SPLIT_SYMBOLS = ",";
    public final static String PROJECT_PROPERTIES_POINT_KEY = "\\.";
    /**
     * 会员审核状态-审核通过
     */
    public final static String MEMBER_AUDIT_PASS = "1";
    /**
     * 会员审核状态-审核未通过
     */
    public final static String MEMBER_AUDIT_FAILED = "2";
    /**
     * 会员审核状态-待审核
     */
    public final static String MEMBER_NOT_AUDIT = "0";
    /**
     * 会员审核状态-邀请中
     */
    public final static String MEMBER_AUDIT_INVITED = "3";
    /**
     * GitLink响应总数Key
     */
    public final static String GITLINK_RESPONSE_TOTAL_COUNT_KEY = "total_count";
    /**
     * GitLink项目列表Key
     */
    public final static String GITLINK_RESPONSE_PROJECTS_KEY = "projects";
    /**
     * 否
     */
    public final static String FALSE = "0";
    /**
     * 是
     */
    public final static String TRUE = "1";
    /**
     * 默认分类
     */
    public final static String DEFAULT_TYPE_NAME = "默认分类";
    /**
     * 资源类型-其他文件
     */
    public final static String RESOURCE_TYPE_OTHER_FILE = "其他文件";
    /**
     * 文件后缀对应资源类型的Redis缓存Key前缀
     */
    public final static String REDIS_KEY_FILE_SUFFIX_OF_RESOURCE_TYPE_PREFIX = "file_suffix_of_zone_resource_type:";


    /**
     * 资源审核状态-审核通过
     */
    public final static String RESOURCE_AUDIT_PASS = "1";
    /**
     * 资源审核状态-审核未通过
     */
    public final static String RESOURCE_AUDIT_FAILED = "2";
    /**
     * 资源审核状态-待审核
     */
    public final static String RESOURCE_NOT_AUDIT = "0";
    /**
     * 前台权限-管理者
     */
    public final static String FRONT_ROLE_MANAGER = "Manager";
    /**
     * 前台权限-会员
     */
    public final static String FRONT_ROLE_MEMBER = "Member";
    /**
     * 前台权限-无权限
     */
    public final static String FRONT_ROLE_NONE = "None";

    public static String getFileSuffixOfResourceTypeRedisKey(Long zoneId, String fileSuffix) {
        return REDIS_KEY_FILE_SUFFIX_OF_RESOURCE_TYPE_PREFIX + zoneId + "_" + fileSuffix;
    }
}
