Перевел на multi-tenant

Добавил поставщиков
Накладные успешно создаются из фронта
This commit is contained in:
2025-12-18 03:56:21 +03:00
parent 47ec8094e5
commit 542beafe0e
38 changed files with 1942 additions and 977 deletions

View File

@@ -14,6 +14,7 @@ type Config struct {
RMS RMSConfig
OCR OCRConfig
Telegram TelegramConfig
Security SecurityConfig
}
type AppConfig struct {
@@ -31,23 +32,26 @@ type RedisConfig struct {
Password string `mapstructure:"password"`
DB int `mapstructure:"db"`
}
type OCRConfig struct {
ServiceURL string `mapstructure:"service_url"`
}
type RMSConfig struct {
BaseURL string `mapstructure:"base_url"`
Login string `mapstructure:"login"`
Password string `mapstructure:"password"` // Исходный пароль, хеширование будет в клиенте
}
type OCRConfig struct {
ServiceURL string `mapstructure:"service_url"`
}
type TelegramConfig struct {
Token string `mapstructure:"token"`
AdminIDs []int64 `mapstructure:"admin_ids"`
WebAppURL string `mapstructure:"web_app_url"`
}
type SecurityConfig struct {
SecretKey string `mapstructure:"secret_key"` // 32 bytes for AES-256
}
// LoadConfig загружает конфигурацию из файла и переменных окружения
func LoadConfig(path string) (*Config, error) {
viper.AddConfigPath(path)