package services import ( "errors" "git.mchus.pro/mchus/quoteforge/internal/models" ) var ( ErrConfigNotFound = errors.New("configuration not found") ErrConfigForbidden = errors.New("access to configuration forbidden") ) // ConfigurationGetter is an interface for services that can retrieve configurations. // Used by handlers to work with LocalConfigurationService. type ConfigurationGetter interface { GetByUUID(uuid string, ownerUsername string) (*models.Configuration, error) GetByUUIDNoAuth(uuid string) (*models.Configuration, error) } type CreateConfigRequest struct { Name string `json:"name"` Items models.ConfigItems `json:"items"` ProjectUUID *string `json:"project_uuid,omitempty"` CustomPrice *float64 `json:"custom_price"` Notes string `json:"notes"` IsTemplate bool `json:"is_template"` ServerCount int `json:"server_count"` ServerModel string `json:"server_model,omitempty"` SupportCode string `json:"support_code,omitempty"` Article string `json:"article,omitempty"` PricelistID *uint `json:"pricelist_id,omitempty"` WarehousePricelistID *uint `json:"warehouse_pricelist_id,omitempty"` CompetitorPricelistID *uint `json:"competitor_pricelist_id,omitempty"` ConfigType string `json:"config_type,omitempty"` // "server" | "storage" DisablePriceRefresh bool `json:"disable_price_refresh"` OnlyInStock bool `json:"only_in_stock"` } type ArticlePreviewRequest struct { Items models.ConfigItems `json:"items"` ServerModel string `json:"server_model"` SupportCode string `json:"support_code,omitempty"` PricelistID *uint `json:"pricelist_id,omitempty"` }