agent-skill-backend/db/cms_content_like.sql

14 lines
794 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- 创建cms_content_like表用户点赞记录
CREATE TABLE `cms_content_like` (
`like_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '点赞记录ID',
`user_id` bigint(20) NOT NULL COMMENT '用户ID',
`user_name` varchar(50) NOT NULL COMMENT '用户名',
`content_id` bigint(20) NOT NULL COMMENT '内容ID',
`content_title` varchar(200) NOT NULL COMMENT '内容标题',
`like_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '点赞时间',
`delete_flag` tinyint(4) NOT NULL DEFAULT '0' COMMENT '删除标志0未删除1已删除',
PRIMARY KEY (`like_id`),
KEY `idx_user_id` (`user_id`),
KEY `idx_content_id` (`content_id`),
KEY `idx_like_time` (`like_time`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='CMS内容点赞记录表';