2026-07-10 12:54:45 +00:00
|
|
|
|
package domain
|
|
|
|
|
|
|
|
|
|
|
|
// Platform — stand-alone const_platform 精神(字串 API,內部可對照)
|
|
|
|
|
|
const (
|
|
|
|
|
|
PlatformPassword = "platform" // email/phone + password
|
|
|
|
|
|
PlatformGoogle = "google"
|
|
|
|
|
|
PlatformLine = "line"
|
|
|
|
|
|
PlatformApple = "apple"
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
// AccountType — stand-alone account type
|
|
|
|
|
|
const (
|
|
|
|
|
|
AccountTypeEmail = "email"
|
|
|
|
|
|
AccountTypePhone = "phone"
|
|
|
|
|
|
AccountTypePlatform = "platform" // third-party subject
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
// Status — stand-alone member status(字串,對齊 FE)
|
|
|
|
|
|
const (
|
|
|
|
|
|
StatusUninitialized = "uninitialized"
|
|
|
|
|
|
StatusUnverified = "unverified"
|
|
|
|
|
|
StatusActive = "active"
|
|
|
|
|
|
StatusSuspended = "suspended"
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
// CodeType for generate/verify codes
|
|
|
|
|
|
const (
|
|
|
|
|
|
CodeTypeEmail = "email"
|
|
|
|
|
|
CodeTypePhone = "phone"
|
|
|
|
|
|
CodeTypeForgetPassword = "forget_password"
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
const (
|
|
|
|
|
|
RoleMember = "member"
|
|
|
|
|
|
RoleAdmin = "admin"
|
|
|
|
|
|
)
|
|
|
|
|
|
|
2026-08-18 16:26:10 +00:00
|
|
|
|
// First-run work trail — write-once on the member.
|
|
|
|
|
|
const (
|
|
|
|
|
|
OnboardingPending = "pending"
|
|
|
|
|
|
OnboardingSkipped = "skipped"
|
|
|
|
|
|
OnboardingCompleted = "completed"
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
func IsOnboardingTerminal(status string) bool {
|
|
|
|
|
|
return status == OnboardingSkipped || status == OnboardingCompleted
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-07-10 12:54:45 +00:00
|
|
|
|
// MinMemberUID — 會員 uid 從一百萬起,固定 8 位數(1000000–99999999)。
|
|
|
|
|
|
// 顯示可用 %08d;內部 JSON 仍是 number。
|
|
|
|
|
|
const MinMemberUID int64 = 1_000_000
|