package model import ( "encoding/json" "time" ) type ProviderConfig struct { QuoteBaseURL string `db:"quote_base_url" json:"quote_base_url"` MarketAdapter string `db:"market_adapter" json:"market_adapter"` HistoryBaseURL string `db:"history_base_url" json:"history_base_url"` ID string `db:"id" json:"id"` ConfigKey string `db:"config_key" json:"config_key"` Name string `db:"name" json:"name"` BaseURL string `db:"base_url" json:"base_url"` ModelName string `db:"model_name" json:"model_name"` WireAPI string `db:"wire_api" json:"wire_api"` ModelCatalogURL string `db:"model_catalog_url" json:"model_catalog_url"` DisableResponseStorage bool `db:"disable_response_storage" json:"disable_response_storage"` RequiresOpenAIAuth bool `db:"requires_openai_auth" json:"requires_openai_auth"` Enabled bool `db:"enabled" json:"enabled"` TimeoutSeconds int `db:"timeout_seconds" json:"timeout_seconds"` EncryptedAPIKey []byte `db:"encrypted_api_key" json:"-"` HasAPIKey bool `json:"has_api_key"` Version int64 `db:"version" json:"version"` LastTestStatus string `db:"last_test_status" json:"last_test_status"` LastTestedAt *time.Time `db:"last_tested_at" json:"last_tested_at"` LastTestMessage string `db:"last_test_message" json:"last_test_message"` UpdatedBy string `db:"updated_by" json:"updated_by"` CreatedAt time.Time `db:"created_at" json:"created_at"` UpdatedAt time.Time `db:"updated_at" json:"updated_at"` } func (ProviderConfig) TableName() string { return "veyra_provider_config" } type ProviderConfigHistory struct { ID string `db:"id" json:"id"` ConfigID string `db:"config_id" json:"config_id"` Version int64 `db:"version" json:"version"` Snapshot json.RawMessage `db:"snapshot" json:"snapshot"` EncryptedAPIKey []byte `db:"encrypted_api_key" json:"-"` ActorID string `db:"actor_id" json:"actor_id"` CreatedAt time.Time `db:"created_at" json:"created_at"` } func (ProviderConfigHistory) TableName() string { return "veyra_provider_config_history" } type AuditEvent struct { ID string `db:"id" json:"id"` ActorID string `db:"actor_id" json:"actor_id"` Action string `db:"action" json:"action"` ObjectType string `db:"object_type" json:"object_type"` ObjectID string `db:"object_id" json:"object_id"` RequestID string `db:"request_id" json:"request_id"` Details json.RawMessage `db:"details" json:"details"` CreatedAt time.Time `db:"created_at" json:"created_at"` } func (AuditEvent) TableName() string { return "veyra_audit_event" }