27 lines
433 B
Go
Raw Normal View History

2025-07-18 20:10:29 +07:00
package constants
type PlanType string
const (
PlanBasic PlanType = "basic"
PlanPremium PlanType = "premium"
PlanEnterprise PlanType = "enterprise"
)
func GetAllPlanTypes() []PlanType {
return []PlanType{
PlanBasic,
PlanPremium,
PlanEnterprise,
}
}
func IsValidPlanType(planType PlanType) bool {
for _, validType := range GetAllPlanTypes() {
if planType == validType {
return true
}
}
return false
}