MiniappGoService/internal/application/constants/salaryRanges.go

29 lines
669 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package constants
type SalaryRange string
const (
FirstStepSalaryRange SalaryRange = "до 180k ₽"
SecondStepSalaryRange SalaryRange = "180300k ₽"
ThirdStepSalaryRange SalaryRange = "300450k ₽"
FourthStepSalaryRange SalaryRange = "450k+ ₽"
DefaultSalaryRange SalaryRange = "Пока неважно"
)
var availableSalaryRanges = map[SalaryRange]struct{}{
FirstStepSalaryRange: {},
SecondStepSalaryRange: {},
ThirdStepSalaryRange: {},
FourthStepSalaryRange: {},
DefaultSalaryRange: {},
}
func (t SalaryRange) Valid() bool {
_, ok := availableSalaryRanges[t]
return ok
}
func (t SalaryRange) String() string {
return string(t)
}