040_init_system_config_data.sql 2.0 KB

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