add mg settings to settings response

This commit is contained in:
Kirill Sukhorukov 2023-08-03 09:20:03 +03:00
parent b445dfdfe5
commit 2875b8620a

View File

@ -748,11 +748,27 @@ type SerializedEditLoyaltyAccount struct {
SerializedBaseLoyaltyAccount SerializedBaseLoyaltyAccount
} }
type ChannelSetting struct {
Site string `json:"site"`
OrderType string `json:"order_type"`
OrderMethod string `json:"order_method"`
}
type MgOrderCreationSettings struct {
Channels map[int]ChannelSetting `json:"channels"`
Default ChannelSetting `json:"default"`
}
type MgSettings struct {
OrderCreation MgOrderCreationSettings `json:"order_creation"`
}
// Settings type. Contains retailCRM configuration. // Settings type. Contains retailCRM configuration.
type Settings struct { type Settings struct {
DefaultCurrency SettingsNode `json:"default_currency"` DefaultCurrency SettingsNode `json:"default_currency"`
SystemLanguage SettingsNode `json:"system_language"` SystemLanguage SettingsNode `json:"system_language"`
Timezone SettingsNode `json:"timezone"` Timezone SettingsNode `json:"timezone"`
MgSettings MgSettings `json:"mg"`
WorkTimes []WorkTime `json:"work_times"` WorkTimes []WorkTime `json:"work_times"`
NonWorkingDays []NonWorkingDays `json:"non_working_days"` NonWorkingDays []NonWorkingDays `json:"non_working_days"`
} }