package config

func App() *ConfigNode {
	return &ConfigNode{
		"env":     env("APP_ENV", "local"),
		"port":    env("APP_PORT", "8000"),
		"appName": env("APP_NAME", "goProject"),
		"appUrl":  env("APP_URL", "http://localhost"),

		"app_secret":       env("APP_SECRET", "6YJSuc50uJ18zj45"),
		"app_check_secret": env("APP_CHECK_SECRET", "6YJSuc50uJ18zj45"), //检测数据篡改密钥
		"api_expiry":       env("API_EXPIRY", "12000"),                  //
		"max_content":      env("MAX_CONTENT", "50000"),                 //最大请求内容长度
		"api_exp":          env("API_EXP", "6000"),                      //api 过期时间
		"api_limit_key":    env("API_LIMIT_KEY", "api_limit_key"),       //api限制key  api_limit_key:gid:openid:apipath
		"api_limit_count":  env("API_LIMIT_COUNT", "50"),                //每分钟限制次数
		"pf_wx":            env("PF_WX", "wx"),
		"pf_tt":            env("PF_TT", "tt"),
		"pf_web":           env("PF_WEB", "web"),
		"province_table":   env("PROVINCE_TABLE", "province_table"), //省份配置映射表
		"gid":              env("GID", "gid:"),                      //游戏配置key  gid:gid
		"user_table_key":   env("USER_TABLE_KEY", "user:"),          //每个游戏的用户键值     gid:pf:user:openid
		"user_table_id":    env("USER_TABLE_ID", "user_table_id"),   //每个游戏的用户表计数键值 自增id  gid:pf:user_tabel_id     id对应表   gid:pf:user_tabel_id：userid

		"user_init_id":                env("USER_INIT_ID", "10000"),                                 //用户初始表id
		"game_data_table_key":         env("GAME_DATA_TABLE_KEY", "gameData:"),                      //每个游戏游戏数据键值   gid:pf:gameData:openid
		"rank_table_key":              env("RANK_TABLE_KEY", "rank:"),                               //每个游戏排行数据键值   gid:pf:rank:TypeId:排序字段
		"rank_province_table_key":     env("RANK_PROVINCE_TABLE_KEY", "rank_province:"),             //每个游戏省排行数据键值  (省内) gid:pf:rank_province:hid:TypeId:排序字段   (省汇总)  gid:pf:rank_province:Sum:排序字段
		"rank_table_extends":          env("RANK_TABLE_EXTENDS", "rank_extends:"),                   //每个游戏排行扩展数据键值  gid:pf:rank_extends:openid:TypeId:排序字段
		"rank_province_table_extends": env("RANK_PROVINCE_TABLE_EXTENDS", "rank_province_extends:"), //每个游戏省排行扩展数据键值   gid:pf:rank_province_extends:hid:openid:TypeId:排序字段
		"rank_max_count":              env("RANK_MAX_COUNT", "100"),                                 //最大拉取排行榜数量
		"JwtSecret":                   env("JwtSecret", "ac11b12e5199457602e42cdab79ca770"),         //替换为你的JWT密钥

		"black_list_table": env("BLACK_LIST_TABLE", "black_list_table:"), //黑名单表
		"option_key":       env("OPTION_KEY", "option_key:"),             //用户配置表    option_key:openid

		"admin_user":   env("ADMIN_USER", "chunhao"),    //默认管理员
		"admin_secret": env("ADMIN_SECRET", "123456"),   //默认管理密码
		"user_total":   env("USER_TOTAL", "user_total"), //所有用户的集合
	}
}

func IsProduction() bool {
	return Get("app.env") == "production"
}
