package domain

// MongoDB BSON field names for member module collections.
const (
	BSONFieldID                      = "_id"
	BSONFieldTenantID                = "tenant_id"
	BSONFieldUID                     = "uid"
	BSONFieldZitadelUserID           = "zitadel_user_id"
	BSONFieldZitadelEmail            = "zitadel_email"
	BSONFieldDisplayName             = "display_name"
	BSONFieldAvatar                  = "avatar"
	BSONFieldPhone                   = "phone"
	BSONFieldLanguage                = "language"
	BSONFieldCurrency                = "currency"
	BSONFieldMemberStatus            = "member_status"
	BSONFieldOrigin                  = "origin"
	BSONFieldPasswordHash            = "password_hash"
	BSONFieldBusinessEmail           = "business_email"
	BSONFieldBusinessEmailVerified   = "business_email_verified"
	BSONFieldBusinessEmailVerifiedAt = "business_email_verified_at"
	BSONFieldBusinessPhone           = "business_phone"
	BSONFieldBusinessPhoneVerified   = "business_phone_verified"
	BSONFieldBusinessPhoneVerifiedAt = "business_phone_verified_at"
	BSONFieldTOTPEnrolled            = "totp_enrolled"
	BSONFieldTOTPSecretCipher        = "totp_secret_cipher" //nolint:gosec // BSON field name, not a credential
	BSONFieldTOTPEnrolledAt          = "totp_enrolled_at"
	BSONFieldTOTPBackupCodesHash     = "totp_backup_codes_hash"
	BSONFieldCreateAt                = "create_at"
	BSONFieldUpdateAt                = "update_at"
	BSONFieldDeletedAt               = "deleted_at"
	BSONFieldAnonymizedAt            = "anonymized_at"
	BSONFieldSuspendReason           = "suspend_reason"

	BSONFieldSlug      = "slug"
	BSONFieldUIDPrefix = "uid_prefix"
	BSONFieldName      = "name"
	BSONFieldStatus    = "status"
	BSONFieldOrgID     = "org_id"

	BSONFieldExternalID = "external_id"
)

// UID sequence defaults. See internal/model/member/SDD.md §3.4 (UID Generation).
const (
	UIDSequenceStart   int64 = 10_000_000
	UIDSequenceBucket  int64 = 500
	UIDPrefixMinLength       = 2
	UIDPrefixMaxLength       = 4
)
