add data container
This commit is contained in:
@ -62,12 +62,34 @@ type ReduxDictionaries struct {
|
|||||||
} `json:"data"`
|
} `json:"data"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type DataContainer[T any] struct {
|
||||||
|
Data T `json:"data"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type DataContainerDictionaries DataContainer[Dictionaries]
|
||||||
|
type DataContainerCategories DataContainer[map[string]int]
|
||||||
|
type DataContainerFiltersCount DataContainer[Filters]
|
||||||
|
|
||||||
|
type Dictionaries struct {
|
||||||
|
CourseThematics ReduxDictionaryContainer `json:"coursesThematics"`
|
||||||
|
LearningType ReduxDictionaryContainer `json:"learningType"`
|
||||||
|
LearningTypeSelection ReduxDictionaryContainer `json:"learningTypeSelection"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type Flagged struct {
|
||||||
|
False int `json:"0"`
|
||||||
|
True int `json:"1"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type Filters struct {
|
||||||
|
IsCourseProfeccion Flagged `json:"isCourseProfession"`
|
||||||
|
}
|
||||||
|
|
||||||
type InitialReduxState struct {
|
type InitialReduxState struct {
|
||||||
Metadata ReduxMetadata `json:"metadata"`
|
Metadata ReduxMetadata `json:"metadata"`
|
||||||
Dictionaries ReduxDictionaries `json:"dictionaries"`
|
Dictionaries DataContainerDictionaries `json:"dictionaries"`
|
||||||
Categories struct {
|
Categories DataContainerCategories `json:"categories"`
|
||||||
Data map[string]int `json:"data"`
|
FiltersCount DataContainerFiltersCount `json:"filtersCount"`
|
||||||
} `json:"categories"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type PageStateProperties struct {
|
type PageStateProperties struct {
|
||||||
|
|||||||
Reference in New Issue
Block a user