package types

type Status int32

const (
	StatusUnspecified Status = 0
	StatusCreated     Status = 1
	StatusInProgress  Status = 2
	StatusOnInterview Status = 3
	StatusDeclined    Status = 4
	StatusSuspended   Status = 5
	StatusAccepted    Status = 6
)

var StatusToRuString = map[Status]string{
	StatusUnspecified: "Не указан",
	StatusCreated:     "Создан",
	StatusInProgress:  "В процессе",
	StatusOnInterview: "На собеседовании",
	StatusDeclined:    "Отклонён",
	StatusSuspended:   "Приостановлен",
	StatusAccepted:    "Принят",
}

func (s Status) String() string {
	if name, ok := StatusToRuString[s]; ok {
		return name
	}

	return "Неизвестный статус"
}

type SubmissionStatus struct {
	Status Status `json:"status"` // извините за тавтологию
}

type VacancyVisibility struct {
	Visible bool `json:"is_visible"`
}
