feat: add community post categories and channels
This commit is contained in:
+24
@@ -328,6 +328,24 @@ CREATE TABLE `la_community_like` (
|
||||
INDEX `idx_target`(`target_id` ASC, `target_type` ASC) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '点赞' ROW_FORMAT = Dynamic;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for la_community_post_category
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `la_community_post_category`;
|
||||
CREATE TABLE `la_community_post_category` (
|
||||
`id` int UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '分类名称',
|
||||
`icon` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '分类图标',
|
||||
`sort` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '排序',
|
||||
`post_count` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '帖子数',
|
||||
`status` tinyint UNSIGNED NOT NULL DEFAULT 1 COMMENT '0禁用1启用',
|
||||
`create_time` int UNSIGNED NOT NULL DEFAULT 0,
|
||||
`update_time` int UNSIGNED NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE INDEX `uk_name`(`name` ASC) USING BTREE,
|
||||
INDEX `idx_status_sort`(`status` ASC, `sort` ASC) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '社区帖子分类' ROW_FORMAT = Dynamic;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for la_community_post
|
||||
-- ----------------------------
|
||||
@@ -339,6 +357,7 @@ CREATE TABLE `la_community_post` (
|
||||
`content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '帖子内容',
|
||||
`images` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '图片地址JSON数组',
|
||||
`post_type` tinyint UNSIGNED NOT NULL DEFAULT 0 COMMENT '0普通帖1赛事推荐2战绩分享',
|
||||
`category_id` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '帖子主分类ID',
|
||||
`match_id` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '关联赛事ID(推荐帖)',
|
||||
`is_paid` tinyint UNSIGNED NOT NULL DEFAULT 0 COMMENT '0免费1付费',
|
||||
`price_points` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '所需积分',
|
||||
@@ -352,6 +371,7 @@ CREATE TABLE `la_community_post` (
|
||||
`is_top` tinyint UNSIGNED NOT NULL DEFAULT 0 COMMENT '0否1置顶',
|
||||
`is_hot` tinyint UNSIGNED NOT NULL DEFAULT 0 COMMENT '0否1热门',
|
||||
`is_recommend` tinyint UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否推荐 0否 1是',
|
||||
`is_topic` tinyint UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否话题 0否 1是',
|
||||
`status` tinyint UNSIGNED NOT NULL DEFAULT 1 COMMENT '0待审核1正常2隐藏',
|
||||
`create_time` int UNSIGNED NOT NULL DEFAULT 0,
|
||||
`update_time` int UNSIGNED NOT NULL DEFAULT 0,
|
||||
@@ -360,7 +380,11 @@ CREATE TABLE `la_community_post` (
|
||||
UNIQUE INDEX `idx_origin_id`(`origin_id` ASC) USING BTREE,
|
||||
INDEX `idx_user`(`user_id` ASC) USING BTREE,
|
||||
INDEX `idx_type`(`post_type` ASC) USING BTREE,
|
||||
INDEX `idx_category`(`category_id` ASC) USING BTREE,
|
||||
INDEX `idx_status`(`status` ASC) USING BTREE,
|
||||
INDEX `idx_status_recommend`(`status` ASC, `is_recommend` ASC, `create_time` ASC) USING BTREE,
|
||||
INDEX `idx_status_hot`(`status` ASC, `is_hot` ASC, `create_time` ASC) USING BTREE,
|
||||
INDEX `idx_status_topic`(`status` ASC, `is_topic` ASC, `create_time` ASC) USING BTREE,
|
||||
INDEX `idx_create`(`create_time` ASC) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 331 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '社区帖子' ROW_FORMAT = Dynamic;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user