-- 040: 初始化系统配置默认数据 -- 基础配置 INSERT INTO aigcspace.system_config (config_key, config_value, config_type, category, description) VALUES ('system_name', '"智创空间"', 'string', 'basic', '系统名称'), ('system_logo', '""', 'string', 'basic', '系统Logo URL'), ('contact_email', '"support@example.com"', 'string', 'basic', '联系邮箱'), ('icp_number', '""', 'string', 'basic', '备案号') ON CONFLICT (config_key) DO NOTHING; -- 功能开关 INSERT INTO aigcspace.system_config (config_key, config_value, config_type, category, description) VALUES ('enable_registration', 'true', 'boolean', 'feature', '是否开放注册'), ('enable_recharge', 'true', 'boolean', 'feature', '是否开放充值'), ('enable_search', 'true', 'boolean', 'feature', '是否开启联网搜索'), ('new_user_bonus', '10', 'number', 'feature', '新用户赠送金额(元)') ON CONFLICT (config_key) DO NOTHING; -- 限制配置 INSERT INTO aigcspace.system_config (config_key, config_value, config_type, category, description) VALUES ('max_tokens_per_request', '4000', 'number', 'limit', '单次请求最大Token数'), ('max_images_per_request', '4', 'number', 'limit', '单次生成最大图片数'), ('max_audio_chars', '5000', 'number', 'limit', '音频合成最大字符数'), ('max_video_duration', '10', 'number', 'limit', '视频生成最大时长(秒)'), ('min_balance_required', '0.01', 'number', 'limit', '最低余额要求(元)') ON CONFLICT (config_key) DO NOTHING; -- 第三方配置(占位符,实际值需要在环境变量中配置) INSERT INTO aigcspace.system_config (config_key, config_value, config_type, category, description) VALUES ('oss_endpoint', '""', 'string', 'third_party', 'OSS Endpoint'), ('oss_bucket', '""', 'string', 'third_party', 'OSS Bucket名称'), ('alipay_app_id', '""', 'string', 'third_party', '支付宝AppID'), ('dashscope_api_key', '""', 'string', 'third_party', 'DashScope API Key') ON CONFLICT (config_key) DO NOTHING;