-- 系统配置表
CREATE TABLE IF NOT EXISTS `sys_config` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `config_key` varchar(50) NOT NULL COMMENT '配置标识',
  `config_value` text COMMENT '配置值(JSON)',
  `remark` varchar(200) DEFAULT '' COMMENT '备注',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_config_key` (`config_key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='系统配置表';

-- 初始化瘤种选项
INSERT INTO `sys_config` (`config_key`, `config_value`, `remark`) VALUES
('tag_options', '["直肠癌","结肠癌","十二指肠癌","空肠癌","回肠癌","胃肠道间质瘤（GIST）","肠道神经内分泌肿瘤","腺瘤性息肉","炎性息肉","增生性息肉","平滑肌瘤","脂肪瘤"]', '瘤种选项列表');
