common.go 595 字节
package constant

import "os"

const SERVICE_NAME = "performance"

// 登录平台ID,28-绩效管理后台  29-员工绩效
const (
	IdPlatformAdmin int = 28
	IdPlatformUser  int = 29
)

var LOG_LEVEL = "debug"

// 过期时间 7天时间
var AdminJwtExpiresIn = int64(3600 * 24 * 7)

var AdminJWTSecretKey = "sg-storage"

// 上传临时Zip文件
var UPLOAD_ZIP_PATH = "./uploads/zip"

// Env 判断当前环境变量
var Env = "dev"

func init() {
	if os.Getenv("LOG_LEVEL") != "" {
		LOG_LEVEL = os.Getenv("LOG_LEVEL")
	}

	if os.Getenv("ENV_MOD") != "" {
		Env = os.Getenv("ENV_MOD")
	}
}