-- 图片列表表
CREATE TABLE IF NOT EXISTS `pap_image` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `column_id` int(11) NOT NULL DEFAULT 0 COMMENT '所属栏目ID',
  `title` varchar(200) NOT NULL DEFAULT '' COMMENT '标题',
  `image` varchar(500) NOT NULL DEFAULT '' COMMENT '图片地址',
  `link` varchar(500) DEFAULT '' COMMENT '链接地址',
  `sort` int(11) DEFAULT 1 COMMENT '排序',
  `status` tinyint(1) DEFAULT 1 COMMENT '状态 1启用 0禁用',
  `is_deleted` tinyint(1) DEFAULT 0 COMMENT '删除标记',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `idx_column` (`column_id`),
  KEY `idx_status` (`status`, `is_deleted`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='图片列表';

-- 测试数据
INSERT INTO `pap_image` (`column_id`, `title`, `image`, `link`, `sort`, `status`) VALUES
(0, '合作伙伴1', '/static/images/partner1.png', '', 1, 1),
(0, '合作伙伴2', '/static/images/partner2.png', '', 2, 1),
(0, '合作伙伴3', '/static/images/partner3.png', '', 3, 1),
(0, '合作伙伴4', '/static/images/partner4.png', '', 4, 1),
(0, '合作伙伴5', '/static/images/partner5.png', '', 5, 1),
(0, '合作伙伴6', '/static/images/partner6.png', '', 6, 1);
