package com.baosight.sts.util; 

import java.util.Random;

/**
 * Created by IntelliJ IDEA.
 * User: king
 * Date: 2008-6-23
 * Time: 17:31:27
 * To change this template use File | Settings | File Templates.
 */
public class BizConstants {
    public static final java.lang.String COM_BIZ_LABEL = "J00000";
    public static final java.lang.String GRANT_POST = "GRANT_POST";
    public static final java.lang.String COMMON_BIZ_LABEL = "J00000";
    public static final java.lang.String CUST_ORG_LABEL = "J00000";

    public static final String USER_ID = "userId";
    public static final String USER_NAME = "userName";
    public static final String ORG_ID = "orgId";
    public static final String ORG_NAME = "orgName";
    public static final String ORG_USER_ID = "orgUserId";
    public static final String PERIOD_ID = "periodId";
    public static final String SWITCH_VALUE = "switchValue";
    public static final String DEPT_NO = "deptNo";
    public static final String DEPT_NAME = "deptName";
    public static final String VOUCHER_DATE = "voucherDate";
    
    public static long VALIDATE_CODE_TIME_OUT = 300;

    public static String getRandomString(int length) {
    	StringBuffer buffer = new StringBuffer("0123456789abcdefghijklmnopqrstuvwxyz");
	    StringBuffer sb = new StringBuffer();
	    Random r = new Random();
	    int range = buffer.length();
	    for (int i = 0; i < length; i ++) {
	        sb.append(buffer.charAt(r.nextInt(range)));
	    }
	    return sb.toString();
	}
}
