41 lines
726 B
Go
41 lines
726 B
Go
package consts
|
|
|
|
// Format
|
|
//
|
|
// // swagger:enum CacheKey
|
|
// // ENUM(
|
|
// // VerifyCode = "code:__CHANNEL__:%s",
|
|
// // )
|
|
|
|
// swagger:enum Role
|
|
// ENUM( user, super_admin)
|
|
type Role string
|
|
|
|
// swagger:enum UserStatus
|
|
// ENUM(pending_verify, verified, banned, )
|
|
type UserStatus string
|
|
|
|
// tenants
|
|
|
|
// swagger:enum TenantStatus
|
|
// ENUM( pending_verify, verified, banned )
|
|
type TenantStatus string
|
|
|
|
// Description in chinese
|
|
func (t TenantStatus) Description() string {
|
|
switch t {
|
|
case "pending_verify":
|
|
return "待审核"
|
|
case "verified":
|
|
return "已审核"
|
|
case "banned":
|
|
return "已封禁"
|
|
default:
|
|
return "未知状态"
|
|
}
|
|
}
|
|
|
|
// swagger:enum TenantUserRole
|
|
// ENUM( member, tenant_admin)
|
|
type TenantUserRole string
|