CREATE TABLE `house_ai_config` (
  `config_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `ai_avatar` varchar(500) DEFAULT NULL COMMENT 'AI形象照',
      `ai_entry_image` varchar(500) DEFAULT NULL COMMENT '首页AI入口图',
  `ai_float_image` varchar(500) DEFAULT NULL COMMENT '首页AI悬浮图',
  `welcome_message` varchar(500) DEFAULT NULL COMMENT '欢迎词',
  `status` tinyint(1) DEFAULT 0 COMMENT '状态 0正常 1禁用',
  `deleted` tinyint(1) DEFAULT 0 COMMENT '是否删除, 0否, 1是',
  `tenant_id` int(11) DEFAULT NULL COMMENT '租户ID',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`config_id`),
  KEY `idx_house_ai_config_status` (`status`),
  KEY `idx_house_ai_config_tenant` (`tenant_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='AI找房配置';

INSERT INTO `house_ai_config` (`ai_avatar`, `ai_entry_image`, `ai_float_image`, `welcome_message`, `status`)
VALUES
('https://oss.wsdns.cn/20260601/0d53634419a448919c90c99ab9779d8a.png?x-oss-process=image/resize,w_750/quality,Q_90', 'https://oss.wsdns.cn/20260626/f5f7d5996e4f45ce8bb24c7c455d07d4.png?x-oss-process=image/resize,m_fixed,w_750/quality,Q_90', 'https://oss.wsdns.cn/20260626/e666a52de6724578b6df007fcacbbe21.gif?x-oss-process=image/resize,m_fixed,w_750/quality,Q_90', '您好，我是AI找房助手，请告诉我面积、楼层、预算和地段，我来帮您筛选更合适的房源。', 0);

-- 已有表升级时执行:
-- ALTER TABLE `house_ai_config`
--   ADD COLUMN `ai_entry_image` varchar(500) DEFAULT NULL COMMENT '首页AI入口图' AFTER `ai_avatar`,
--   ADD COLUMN `ai_float_image` varchar(500) DEFAULT NULL COMMENT '首页AI悬浮图' AFTER `ai_entry_image`;
