const_def.go 7.75 KB
Newer Older
chenweijian's avatar
chenweijian committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121
package common

type MsgIdType = uint
type OnlineStatusType = uint
type GroupRoleType = uint16
type AddGroupResultType = uint

const (
	APP_KICKOFF_TIME = "2020-12-19"

	DEFAULT_LANG        = "en"
	DEFAULT_COUNTRY     = "KSA"
	DEFAULT_NICK        = "Hilo No.%s"
	DEFAULT_DESCRIPTION = "Welcome to Hilo"
	DEFAULT_GROUP_NAME  = "Hilo Group NO.%s"

	DefaultAvatarMan   = "hilo/manager/ea48b62d54a24a709de3c38702c89995.png"
	DefaultAvatarWoman = "hilo/manager/ea48b62d54a24a709de3c38702c89995.png"
	// 用户视频最低要求时长
	BASIC_VIDEO_TIME = 1

	// 公会用户视频最低要求时长
	GUILD_USER_VIDEO_TIME = 15

	STATUS_IN_USE = 1
	STATUS_UNUSED = 2

	// 公会用户是否打开通知
	GuildUserNotifyOn  = 1
	GuildUserNotifyOff = 2

	// 平台
	PlatformIOS      = 1
	PlatformGOOGLE   = 2
	PlatformEggPlant = 3 // 通过starchat回调的茄子充值
	PlatformCheckout = 4
	PlatformPayerMax = 5 // 通过hilo用户发起,starchat回调的PayerMax/茄子充值
	PlatformPaypal   = 6 // paypal充值

	// 加、减
	DIRECTION_ADD    = 1
	DIRECTION_REDUCE = 2

	// 操作类型
	//发送礼物
	OPERATE_TYPE_SENDGIFT = 1
	//匹配条件
	OPERATE_TYPE_MATCHCONDITION = 2
	//建立融云会话
	OPERATE_TYPE_SESSIONPAY = 3
	//购买钻石
	OPERATE_TYPE_BUYDIAMOND = 4
	//接受礼物
	OPERATE_TYPE_RECEIVEGIFT = 5
	//注册
	OPERATE_TYPE_REGISTER = 6
	//平台赠送
	OPERATE_TYPE_MGRSEND = 8

	MATCH_CONFIRM_SUCCESS = 1
	MATCH_CONFIRM_FAIL    = 2
	MATCH_CONFIRM_TEMP    = 3

	ACCEPT_MATCH_CONFIRM = 1
	REFUSE_MATCH_CONFIRM = 2

	// 视频通话是否达标
	VIDEO_EFFECTIVE_YES = 1
	VIDEO_EFFECTIVE_NO  = 2

	// 最大用户相册数
	USER_PHOTO_MAX = 9

	// 上下架状态
	SWITCH_ON = 1
	SWITH_OFF = 0

	// 群组角色
	GROUP_VISITOR GroupRoleType = 0   // 游客
	GROUP_MEMBER  GroupRoleType = 1   // 成员
	GROUP_ADMIN   GroupRoleType = 10  // 管理员
	GROUP_MANAGER GroupRoleType = 50  // 经理
	GROUP_OWNER   GroupRoleType = 100 // owner

	ROOM_PASSWORD_LENGTH     = 4
	CREATE_GROUP_MAX_ATTEMPT = 10

	// 在线状态
	IM_STATUS_OFF_LINE     OnlineStatusType = 0
	IM_STATUS_PUSH_ON_LINE OnlineStatusType = 1
	IM_STATUS_ON_LINE      OnlineStatusType = 2

	MSG_ID_GROUP_NAME         MsgIdType = 101
	MSG_ID_GROUP_INTRODUCTION MsgIdType = 102
	MSG_ID_GROUP_NOTIFICATION MsgIdType = 103
	MSG_ID_GROUP_WELCOME      MsgIdType = 104
	MSG_ID_GROUP_INVITE       MsgIdType = 105
	MSG_ID_GROUP_LEAVE_POWER  MsgIdType = 106
	MSG_ID_ALL_GROUP_ROCKET   MsgIdType = 107
	MSG_ID_ROOM_MEADAL        MsgIdType = 108
	MSG_ID_VIDEO_PUSH_TITITLE MsgIdType = 109
	MSG_ID_VIDEO_PUSH_CONTENT MsgIdType = 110
	MSG_ID_REPEAT_ACCOUNT     MsgIdType = 111
	MSG_ID_USER_TRANSFER      MsgIdType = 114
	MSG_ID_NO_POWER_TO_SVIP6  MsgIdType = 115 // 不能对svip6做某些动作
	// ps:116-138 在hilo-finance定义了!
	MSG_ID_NOT_FAMILY_MEMBER    MsgIdType = 165 // 非家族成员
	MSG_ID_DEALER_CAN_NOT_SOLE  MsgIdType = 166 // 此用户已有家族代理,不能出售钻石
	MSG_ID_BUY_FROM_FAMILY      MsgIdType = 167 // 请向本家族代理购买钻石
	MSG_ID_NEED_JOIN_FAMILY     MsgIdType = 168 // 请加入代理的家族后进行购买
	MSG_ID_TRAN_DIAMONDS        MsgIdType = 172 // 代理转币
	MSG_ID_LINK_CHARGE_REBATE   MsgIdType = 173 // 链接充值返利
	MSG_ID_LINK_CHARGE          MsgIdType = 174 // 链接充值
	MSG_ID_AGENT_DIAMOND_REBATE MsgIdType = 175 // 代理充值返利
	MSG_ID_AGENT_DIAMOND        MsgIdType = 176 // 代理充值
	MSG_ID_AGENT_SYSTEM         MsgIdType = 178 // 系统给代理充值
	MSG_ID_CHARGE_NO_AREA       MsgIdType = 181 // 充值(代理转账,用户给代理充值),失败,不是本区域用户
	MSG_ID_FAMILY_JOIN          MsgIdType = 185 // 用户申请加入家族
	MSG_ID_SEND_GIFT_TO_NO_ONE  MsgIdType = 229 // 送礼给没人
	MSG_ID_TRAN_GEM             MsgIdType = 231 // 转移宝石(粉钻)
	MSG_ID_BUY_GEM              MsgIdType = 232 // 买宝石(粉钻)
chenweijian's avatar
chenweijian committed
122 123 124 125 126 127 128 129 130
	MSG_ID_ALREADY_HAS_CP       MsgIdType = 243 // 对方已有CP了
	MSG_ID_INVITE_CP            MsgIdType = 244 // 你想要和我成为CP吗
	MSG_ID_WANT_BE_YOUR_CP      MsgIdType = 245 // 我想成为你的CP
	MSG_ID_EXPIRES_AFTER_24_H   MsgIdType = 246 // 24小时后自动失效
	MSG_ID_WANT_UNBIND_CP       MsgIdType = 247 // 我想解绑CP
	MSG_ID_BIND_CP_SUCCEED      MsgIdType = 248 // 绑定成功-我们已经是CP了
	MSG_ID_SEND_CP_GIFT         MsgIdType = 249 // 发放cp礼物
	MSG_ID_REJECTED_CP_INVITE   MsgIdType = 250 // %s已拒绝CP邀请
	MSG_ID_UNBIND_CP_SUCCEED    MsgIdType = 251 // 解绑cp成功
chenweijian's avatar
chenweijian committed
131
	MSG_ID_ALREADY_EXPIRED      MsgIdType = 258 // 已经过期
chenweijian's avatar
chenweijian committed
132
	MSG_ID_CANCEL_UNBIND_CP     MsgIdType = 274 // 撤销了解绑CP的申请
chenweijian's avatar
chenweijian committed
133 134 135 136 137
	MSG_ID_WAITING_ACCEPTED     MsgIdType = 275 // 等待对方接受
	MSG_ID_INVITATION_ACCEPTED  MsgIdType = 276 // 邀请被接受
	MSG_ID_INVITATION_REFUSED   MsgIdType = 277 // 邀请被拒绝
	MSG_ID_CP_UNBOUND           MsgIdType = 278 // 已解绑CP
	MSG_ID_HAS_BEEN_CANCELED    MsgIdType = 279 // 已被取消
chenweijian's avatar
chenweijian committed
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238

	ADD_GROUP_FAILED    AddGroupResultType = 0
	ADD_GROUP_DONE      AddGroupResultType = 1
	ADD_GROUP_DUPLICATE AddGroupResultType = 2
	ADD_GROUP_PENDING   AddGroupResultType = 3

	SETTING_OFFICIAL   = 1
	SETTING_CUSTOMIZED = 2
)

var USER_QPS_DEFAULT_MAX int64 = 15
var HEART_VALUE_MAX uint32 = 2000
var BUILDBOARD_SMALL_SIZE = 30
var BUILDBOARD_SIZE = 50
var BUILDBOARD_SMALL_SIZE_10 = 10

var GROUP_CREATE_LIMIT = 1
var GROUP_NAME_LENGTH_LIMIT = 30
var GROUP_INTRODUCTION_LENGTH_LIMIT = 500
var GROUP_NOTIFICATION_LENGTH_LIMIT = 150

var MAX_BEAUTIFUL_CODE_LENGTH = 8
var GROUP_DEFAULT_CODE_LENGTH uint16 = 8
var GROUP_DEFAULT_JOIN_LIMIT uint = 200
var GROUP_VIP_JOIN_LIMIT uint = 500
var GROUP_NOBLE4_JOIN_LIMIT uint = 1000

var GROUP_MANAGER_LIMIT uint = 30
var GROUP_ADMIN_LIMIT uint = 50
var GROUP_ROLE_VIEW_LIMIT = 10
var GROUP_ROLE_PERSONAL_VIEW_LIMIT = 5

var GROUP_RECOMMEND_SIZE = 5

var IM_INVALID_USER = "@TLS#NOT_FOUND"

// TIM相关常量
const (
	SYNC_TO_SENDER   = 1
	NOSYNC_TO_SENDER = 2

	TAG_PROFILE_IM_LEVEL = "Tag_Profile_IM_Level"
	TAG_PROFILE_IM_NICK  = "Tag_Profile_IM_Nick"
	TAG_PROFILE_IM_IMAGE = "Tag_Profile_IM_Image"
	TAG_PROFILE_IM_HILO  = "Tag_Profile_Custom_Hilo"
)

// 群组内游戏相关
const (
	GROUP_DICE_NUM_DEFAULT = 5
	GROUP_DICE_NUM_MAX     = 5
)

var PAY_TEST_USERS = []uint64{11, 21, 41, 71, 151, 251, 291, 881, 1041, 4411, 951, 24091}

var ROCKET_STAGE_NUM uint16 = 3
var ROCKET_STAGE_CHANGE_THRESHOLD = 10
var ROCKET_SHOW_DURATION = 10

// RocketAwardType
const (
	ROCKET_AWARD_GUEST_DIAMOND = 0 // 观众分到小额钻石
	ROCKET_AWARD_PROPERTY      = 1 // TOP6抽到的座驾
	ROCKET_AWARD_HEADDRESS     = 2 // TOP6抽到的头饰
	ROCKET_AWARD_DIAMOND       = 3 // TOP6抽到的钻石
)

const DefaultMinimalVersionAndroid = 100
const DefaultMinimalVersionIOS = 100

const DefaultMsgParallelSize = 20

const OldGroupNamePrefix = "@TGS#"
const NewGroupNamePrefix = "HTGS#"
const OverseaGroupNamePrefix = NewGroupNamePrefix + "a"

const (
	SendSmsCodeIpMaxHourTimes       = 20
	SendSmsCodeImeiMaxHourTimes     = 10
	SendSmsCodePhoneMaxHourTimes    = 5
	SendSmsCodeUserMaxHourTimes     = 3
	SendSmsCodeLen                  = 6    // 验证码长度
	SendSmsCodeMaxCheckTimes        = 3    // 验证码最大校验次数
	SendSmsCodeNoUserIdMaxHourTimes = 1000 // 没有传userId调用发短信,5分钟最大次数

	CallbackCheckoutPaySucceed = "payment_captured" // checkout回调支付成功

	// ranking
	RankingDay   = "day"
	RankingWeek  = "week"
	RankingMonth = "month"
	RankingAll   = "all"
	// ranking module
	RankingModulePinkDiamond = "pinkDiamond"

	// giftwall 礼物墙
	GiftWallInitNum        = 15000 // 礼物墙初始化数量
	GiftWallInitOnceSetNum = 500   // 礼物墙初始化,一次插入的数量
	GiftWallStartReduceNum = 20000 // 礼物墙触发清理逻辑数量
	GiftWallReduceNum      = 3000  // 礼物墙触发清理逻辑,清理的数量
)