describe more metadata props
This commit is contained in:
@ -85,8 +85,69 @@ type Filters struct {
|
||||
IsCourseProfeccion Flagged `json:"isCourseProfession"`
|
||||
}
|
||||
|
||||
type DataSourceType string
|
||||
|
||||
const (
|
||||
DataSourceTypeDictionaryConfig DataSourceType = "dictionaryConfig"
|
||||
DataSourceTypeDictionary DataSourceType = "dictionary"
|
||||
DataSourceTypeOrganization DataSourceType = "organization"
|
||||
)
|
||||
|
||||
type ReduxDataSource struct {
|
||||
Type DataSourceType `json:"type"`
|
||||
Source string `json:"source"`
|
||||
}
|
||||
|
||||
type ReduxConfigDictionaryBaseUnit struct {
|
||||
Label string `json:"label"`
|
||||
Value string `json:"value"`
|
||||
}
|
||||
|
||||
type ReduxConfigDictionaryRangeUnit struct {
|
||||
ReduxConfigDictionaryBaseUnit
|
||||
|
||||
Range struct {
|
||||
From int `json:"from"`
|
||||
To int `json:"to"`
|
||||
} `json:"range"`
|
||||
}
|
||||
|
||||
type ReduxConfigFilterUnit struct {
|
||||
Label string `json:"label"`
|
||||
Func string `json:"func"` // multiSelect, calculate, checkBox, multiSelectRange,
|
||||
Properties []string `json:"properties"`
|
||||
Name string `json:"name"`
|
||||
DataSource string `json:"dataSource"`
|
||||
IsInversion bool `json:"isInversion"`
|
||||
Property string `json:"property"`
|
||||
Value string `json:"value"`
|
||||
}
|
||||
|
||||
type ReduxConfigSorting struct {
|
||||
Property string `json:"property"`
|
||||
// 3 more fields
|
||||
}
|
||||
|
||||
type ReduxConfig struct {
|
||||
Default struct {
|
||||
SortingParameters []string `json:"sortingParameters"`
|
||||
} `json:"default"`
|
||||
DataSources map[string]ReduxDataSource `json:"dataSources"`
|
||||
Dictionaries struct {
|
||||
PriceFilter []ReduxConfigDictionaryRangeUnit `json:"dictionaryPriceFilter"`
|
||||
GraphicFilter []ReduxConfigDictionaryBaseUnit `json:"dictionaryGraphicFilterNew"`
|
||||
FormatFilter []ReduxConfigDictionaryBaseUnit `json:"dictionaryFormatFilterNew"`
|
||||
LevelFilter []ReduxConfigDictionaryBaseUnit `json:"dictionaryLevelFilterNew"`
|
||||
TimeFilter []ReduxConfigDictionaryRangeUnit `json:"dictionaryTimeFilter"`
|
||||
InstallmentFilter []ReduxConfigDictionaryRangeUnit `json:"dictionaryInstallmentFilter"`
|
||||
}
|
||||
Filters []ReduxConfigFilterUnit `json:"filters"`
|
||||
Sorting []ReduxConfigSorting `json:"sorting"`
|
||||
}
|
||||
|
||||
type InitialReduxState struct {
|
||||
Metadata ReduxMetadata `json:"metadata"`
|
||||
Config ReduxConfig `json:"config"`
|
||||
Dictionaries DataContainerDictionaries `json:"dictionaries"`
|
||||
Categories DataContainerCategories `json:"categories"`
|
||||
FiltersCount DataContainerFiltersCount `json:"filtersCount"`
|
||||
|
||||
Reference in New Issue
Block a user