package mod

import "fmt"

const (
	TYPE_MARQUEE = 1
)

var (
	KTConfChannels    string = "conf:channels"     // channel 配置
	KTConfGames       string = "conf:games"        // game 配置
	KTConfClientAddrs string = "conf:clientaddrs"  // 客户端配置
	KHConfActivities  string = "conf:activities"   // 活动
	KHConfMarquees    string = "conf:announce:1"   // 跑马灯
	KHConfNotices     string = "conf:notices"      // 公告
	KHMapUserAgent    string = "map:user_agent"    // 映射
	KHMapUserLogic    string = "map:user_logic"    // 映射
	KHMapPhoneGuid    string = "map:phone_guid"    // 记录手机绑定
	KHMapGuidCronJob  string = "map:guid_cronjob"  // guid-延时任务 强制关端 每1分钟轮询下分
	KHMapAccountGuid  string = "map:account_guid"  // 账号-guid
	KHMapAlipayGuid 	string = "map:py:guid"
	KHVipBonus        string = "rt:vip:bonus"      // vip 单次奖励
	KHVipWeekly       string = "rt:vip:weekly"     // vip 周奖励
	KHVipMonthly      string = "rt:vip:monthly"    // vip 月奖励
	KHKickoffs        string = "rt:kickoffs"       // 被踢用户,
	KHCheckin7        string = "rt:checkin7"       // 7 天签到
	KHCheckin30       string = "rt:checkin30"      // 30 d checkin
	KHUnreadCS        string = "rt:unread_cs"      // 未读客服消息
	KHAlms            string = "rt:alms"           // 救济金
	KHTurntable       string = "rt:turntable"      // 转盘
	KHUserActive      string = "rt:user_active"    // 用户活跃
	KHMapGuidTask     string = "map:guid_task"     // 游戏任务
	KHConfGameTask    string = "conf:gametask"     // 游戏任务配置
	KHMAPGuidGHistory string = "map:guid_ghistory" // 玩家近期游戏列表
	KHRedEnvelope     string = "rt:redEnvelope"    //红包记录
)

// 用户基本信息
func KUserInfo(guid uint64) string {
	return fmt.Sprintf("user:%d", guid)
}

// 用户私信
func KUserMails(guid uint64) string {
	return fmt.Sprintf("user:mails:%d", guid)
}

// 验证码
func KUserVerifiCode(guid uint64, phone string) string {
	return fmt.Sprintf("tmp:%d:%s", guid, phone)
}

func KMapAgentUser(agentId uint64) string {
	return fmt.Sprintf("map:agent_user:%d", agentId)
}

func KMapLogicUser(logicId uint64) string {
	return fmt.Sprintf("map:logic_user:%d", logicId)
}

func KTradeStatus(AgentName string, ticketId int64) string {
	return fmt.Sprintf("trade:"+AgentName+":%d", ticketId)
}

func KTradeFailed(AgentName string, ticketId int64) string {
	return fmt.Sprintf("trade:"+AgentName+":failed:%d", ticketId)
}

func KTradeFailedKey(AgentName string) string {
	return fmt.Sprintf("trade:" + AgentName + ":failed:*")
}
func KTradeTicketMap(AgentName string) string {
	return fmt.Sprintf("trade:" + AgentName + ":serial_ticketId")
}

//DBDZ 根据交易序号查询交易信息
func KDBDZTransferIdKey(AgentName string) string {
	return fmt.Sprintf("trade:" + AgentName + ":transfer")
}

//DBDZ 交易失败
func KDBDZTradeFailed(AgentName string) string {
	return fmt.Sprintf("trade:" + AgentName + ":failed")
}

//DBDZ 下注失败
func KDBDZBetFaild(AgentName string) string {
	return fmt.Sprintf("trade:" + AgentName + ":failed")
}
