#!/bin/bash

# Game Type (JS, DJ, FN, GD, LH, FF, DS, AR, M2, LA, ...)
GAME_TYPE="DJ"

# Country Code(ISO 3166-1, UPPER CASE)for example: "TW"
COUNTRY_CODE_DISPLAY="GLOBAL"
COUNTRY_CODE="GL" 

# Google Chat Webhook
GOOGLE_CHAT_WEBHOOK_URL="https://chat.googleapis.com/v1/spaces/AAAA7hXAOCM/messages?key=AIzaSyDdI0hCZtE6vySjMm-WEfRq3CPzqKqqsHI&token=YupvEeDhNq2aF9ldCAf8TeJw8kmafVAXpj3xJWIzRGw%3D"

ACCOUNT_DB_NAME="DJAccount"
check_table_uploading () {
	name="$1"

	ret=$(psql -U postgres ${ACCOUNT_DB_NAME} -c "COPY (SELECT status FROM xl_system_table_check WHERE name = '${table_name}') TO STDOUT;")

	if [ ! -z "$ret" ]; then
		echo "$ret"
	else
		echo "1"
	fi
}

get_env_tag_output () {
	env="$1"

	if [ "${env}" == "0" ]; then
		ENV_TAG="(測試)"
	elif [ "${env}" == "1" ]; then
		ENV_TAG="(正式)"
	else
		ENV_TAG="(Unknown)"
	fi

	echo "${ENV_TAG}"
}
