package domain

import "strings"

type RedisKey string

const (
	GenerateVerifyCodeRedisKey RedisKey = "rf_code"
)

func (key RedisKey) ToString() string {
	return string(key)
}

func (key RedisKey) With(s ...string) RedisKey {
	parts := append([]string{string(key)}, s...)

	return RedisKey(strings.Join(parts, ":"))
}
