package businesstype

// BusinessType 操作业务
type BusinessType int

const (
	// 注册登录业务
	Other          BusinessType = 0  // 其他
	Register       BusinessType = 1  // 注册
	Login          BusinessType = 2  // 登入
	ResetPass      BusinessType = 3  // 找回密码
	ChangePassword BusinessType = 4  // 更改密码
	ScanLogin      BusinessType = 14 // 扫码登入

	// 身份验证专用业务类型（请勿占用）
	OpenPhoneAuth    BusinessType = 11
	ChangePhoneAuth  BusinessType = 21
	ClosePhoneAuth   BusinessType = 31
	OpenEmailAuth    BusinessType = 12
	ChangeEmailAuth  BusinessType = 22
	CloseEmailAuth   BusinessType = 32
	OpenGoogleAuth   BusinessType = 13
	ChangeGoogleAuth BusinessType = 23
	CloseGoogleAuth  BusinessType = 33

	//提现验证使用
	WithdrawAuth BusinessType = 201
	//userkey验证
	UserKeyAuth BusinessType = 202
	//地址浦
	AddAddress BusinessType = 203

	// 以下请从 100 开始定义
	OtcCaptcha          BusinessType = 100 // OTC 验证码
	AddPayAccount       BusinessType = 101 // 新增收款账号
	EditPayAccount      BusinessType = 102 // 编辑收款账号
	OTCSellerConfirmPay BusinessType = 103 // OTC 卖家已确认收款
	OTCSellerAppeal     BusinessType = 104 // OTC 买家申诉
	OTCBuyerPaid        BusinessType = 105 // OTC 买家已付款
	OTCBuyerAppeal      BusinessType = 106 // OTC 买家申诉
	AgentEmailCode      BusinessType = 107 // 代理商找回密码验证码
)

// 业务类型中文映射
var BusinessTypeMapCN = map[BusinessType]string{
	Other:          "其它",
	Register:       "注册",
	Login:          "登录",
	ResetPass:      "重置密码",
	ChangePassword: "修改登录密码",

	OpenPhoneAuth:    "开启手机验证",
	ChangePhoneAuth:  "更改手机验证",
	ClosePhoneAuth:   "关闭手机验证",
	OpenEmailAuth:    "开启邮箱验证",
	ChangeEmailAuth:  "更改邮箱验证",
	CloseEmailAuth:   "关闭邮箱验证",
	OpenGoogleAuth:   "开启谷歌验证",
	ChangeGoogleAuth: "更改谷歌验证",
	CloseGoogleAuth:  "关闭谷歌验证",

	WithdrawAuth: "提现验证",
	UserKeyAuth:  "api验证",
	AddAddress:   "新增地址浦验证",

	OtcCaptcha:     "OTC验证码",
	AddPayAccount:  "新增收款账号",
	EditPayAccount: "编辑收款账号",
}

// 业务类型英文映射
var BusinessTypeMapEN = map[BusinessType]string{
	Other:          "Other",
	Register:       "Register",
	Login:          "Login",
	ResetPass:      "Reset Password",
	ChangePassword: "Change Login Password",

	OpenPhoneAuth:    "Enable mobile phone verification",
	ChangePhoneAuth:  "Change phone verification",
	ClosePhoneAuth:   "Turn off phone verification",
	OpenEmailAuth:    "Enable mailbox verification",
	ChangeEmailAuth:  "Change mailbox validation",
	CloseEmailAuth:   "Turn off mailbox verification",
	OpenGoogleAuth:   "Turn on Google Authentication",
	ChangeGoogleAuth: "Change Google Authentication",
	CloseGoogleAuth:  "Turn off Google Authentication",

	WithdrawAuth: "Withdraw Auth",
	UserKeyAuth:  "UserKey Auth",
	AddAddress:   "AddAddress Auth",

	OtcCaptcha:     "otc phone verification",
	AddPayAccount:  "otc add payaccount",
	EditPayAccount: "otc edit payaccount",
}
