package dbtypes

type Fieldtype string

type (
	CompanyMetadata map[string]string

	ValidValue struct {
		DisplayName string `json:"display_name"`
		Value       string `json:"value"`
	}

	/*
		CompanyExtraFieldTemplate describes single
		additional field of company additional fields template
	*/
	CompanyExtraFieldTemplate struct {
		SystemName     string       `json:"system_name"`
		DisplayName    string       `json:"display_name"`
		Type           Fieldtype    `json:"type"`
		Required       bool         `json:"required"`
		MultipleChoice bool         `json:"multiple_choice"`
		ValidValues    []ValidValue `json:"valid_values"`
	}

	/*
		CompanyExtraFieldsTemplate describes additional fields
		needed to integrate company
	*/
	CompanyExtraFieldsTemplate struct {
		Fields []CompanyExtraFieldTemplate `json:"fields"`
	}

	/*
		VacancyExtraFieldTemplate describes single filled
		additional field of vacancy additional fields template
	*/
	VacancyExtraFieldTemplate struct {
		SystemName     string    `json:"system_name"`
		Type           Fieldtype `json:"type"`
		IsValidValue   bool      `json:"is_valid_values"`
		MultipleChoice bool      `json:"multiple_choice"`
		Value          []string  `json:"value"`
	}

	/*
		VacancyExtraFieldsTemplate describes additional fields
		filled during vacancy creation
	*/
	VacancyExtraFieldsTemplate struct {
		Fields []VacancyExtraFieldTemplate `json:"fields"`
	}
)
