package org.springblade.gateway.goods_gateway.constant;

/**
 * @Author: Silent
 * @Description
 * @Date: Created in 9:54 2021/11/25
 * @Modified By:
 */
public interface HelpGoodsConstant {
	/**
	 * 道具缓存
	 */
	String HELP_GOODS_CACHE = "SING:HELP_GOODS:CACHE";

	/**
	 * 验证码缓存
	 */
	String HELP_GOODS_VERIFICATION_CODE = "SING:HELP_GOODS_VERIFICATION_CODE:CACHE";

	/**
	 * 验证码缓存
	 */
	Long HELP_GOODS_VERIFICATION_CODE_EXIST_TIME = 60L;

	/**
	 * 获取缓存Key
	 *
	 * @param userId
	 * @param productId
	 * @param helpGoodsId
	 * @return
	 */
	static String getVerificationCodeKey(Long userId, Long productId, Long helpGoodsId) {
		return new StringBuilder(HELP_GOODS_VERIFICATION_CODE)
			.append(":").append(userId)
			.append(":").append(productId)
			.append(":").append(helpGoodsId).toString();
	}
}
