package com.vctgo.common.core.constant;

import java.util.Arrays;
import java.util.List;

/**
 * 通用常量信息
 *
 * @author vctgo
 */
public class Constants {
    /**
     * UTF-8 字符集
     */
    public static final String UTF8 = "UTF-8";

    /**
     * GBK 字符集
     */
    public static final String GBK = "GBK";
    /**
     * www主域
     */
    public static final String WWW = "www.";


    /**
     * RMI 远程方法调用
     */
    public static final String LOOKUP_RMI = "rmi:";

    /**
     * LDAP 远程方法调用
     */
    public static final String LOOKUP_LDAP = "ldap:";

    /**
     * LDAPS 远程方法调用
     */
    public static final String LOOKUP_LDAPS = "ldaps:";

    /**
     * http请求
     */
    public static final String HTTP = "http://";

    /**
     * https请求
     */
    public static final String HTTPS = "https://";

    /**
     * 成功标记
     */
    public static final Integer SUCCESS = 200;

    /**
     * 失败标记
     */
    public static final Integer FAIL = 500;

    /**
     * 失败标记
     */
    public static final Integer CONFLICT = 409;

    /**
     * 登录成功状态
     */
    public static final String LOGIN_SUCCESS_STATUS = "0";

    /**
     * 登录失败状态
     */
    public static final String LOGIN_FAIL_STATUS = "1";
    /**
     * 登录成功
     */
    public static final String LOGIN_SUCCESS = "Success";

    /**
     * 注销
     */
    public static final String LOGOUT = "Logout";

    /**
     * 注册
     */
    public static final String REGISTER = "Register";

    /**
     * 登录失败
     */
    public static final String LOGIN_FAIL = "Error";

    /**
     * 当前记录起始索引
     */
    public static final String PAGE_NUM = "pageNum";

    /**
     * 每页显示记录数
     */
    public static final String PAGE_SIZE = "pageSize";

    /**
     * 排序列
     */
    public static final String ORDER_BY_COLUMN = "orderByColumn";

    /**
     * 排序的方向 "desc" 或者 "asc".
     */
    public static final String IS_ASC = "isAsc";

    /**
     * 验证码有效期（分钟）
     */
    public static final long CAPTCHA_EXPIRATION = 2;

    /**
     * 资源映射路径 前缀
     */
    public static final String RESOURCE_PREFIX = "/profile";

    /**
     * code码
     */
    public static final int CAINIAOAPI_SUCCESS_CODE = 1;

    /**
     *文档
     */
    public final static List<String> DOCUMENT_TAGS = Arrays.asList("doc", "xls", "ppt", "pdf", "docx", "xlsx", "xlsm", "pptx", "txt", "wps", "htm", "html");

    /**
     * 图片
     */
    public final static List<String> PICTURE_TAGS = Arrays.asList("jpg", "jpeg", "png", "gif");

    /**
     * 视频
     */
    public final static List<String> VIDEO_TAGS = Arrays.asList("avi", "wmv", "mpeg", "mp4", "m4v", "mov", "asf", "flv", "f4v", "rmvb", "rm", "3gp", "vob");

    /**
     * 音频
     */
    public final static List<String> AUDIO_TAGS = Arrays.asList("mp3", "wav", "wma", "mp2", "flac", "midi", "ra", "ape", "aac", "cda", "mov");

    /**
     * 压缩包
     */
    public final static List<String> PACKAGE_TAGS = Arrays.asList("7z", "zip", "rar", "apz", "ar", "bz", "car", "dar", "cpgz", "f", "ha", "hbc", "hbc2", "hbe", "hpk", "hyp");
}
