【新增】教程分类

This commit is contained in:
2025-10-28 13:50:41 +08:00
parent 0df7f645a6
commit 4c66e875cf
5 changed files with 158 additions and 0 deletions

View File

@@ -0,0 +1,64 @@
package com.corewing.app.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 教程分类
*/
@Data
@TableName("app_course_category")
public class CourseCategory implements Serializable {
/**
* 分类id
*/
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 图标
*/
private String icon;
/**
* 分类名称
*/
private String categoryTitle;
/**
* 分类描述
*/
private String description;
/**
* 类别category分类tag标签
*/
private String type;
/**
* 置首页0不置首1置首页
*/
private Integer firstStatus;
/**
* 状态1正常2关闭
*/
private Integer status;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
}

View File

@@ -0,0 +1,32 @@
package com.corewing.app.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
/**
* 教程与分类关系实体
*/
@Data
@TableName("app_course_category_relation")
public class CourseCategoryRelation implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
private Long id;
/**
* 教程id
*/
private Long CourseId;
/**
* 教程分类id
*/
private Long CategoryId;
}

View File

@@ -0,0 +1,7 @@
package com.corewing.app.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.corewing.app.entity.CourseCategory;
public interface CourseCategoryService extends IService<CourseCategory> {
}

View File

@@ -0,0 +1,11 @@
package com.corewing.app.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.corewing.app.entity.CourseCategory;
import com.corewing.app.mapper.CourseCategoryMapper;
import com.corewing.app.service.CourseCategoryService;
import org.springframework.stereotype.Service;
@Service
public class CourseCategoryServiceImpl extends ServiceImpl<CourseCategoryMapper, CourseCategory> implements CourseCategoryService {
}

View File

@@ -0,0 +1,44 @@
/*
Navicat Premium Dump SQL
Source Server : 120.24.204.180
Source Server Type : MySQL
Source Server Version : 80036 (8.0.36)
Source Host : 120.24.204.180:3306
Source Schema : app
Target Server Type : MySQL
Target Server Version : 80036 (8.0.36)
File Encoding : 65001
Date: 28/10/2025 13:46:32
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for app_course_category
-- ----------------------------
DROP TABLE IF EXISTS `app_course_category`;
CREATE TABLE `app_course_category` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
`icon` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '图标',
`category_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '分类名称',
`description` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '分类描述',
`first_status` int NOT NULL DEFAULT '2' COMMENT '置首页1置首2不置首',
`type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '类别category分类tag标签',
`status` tinyint(1) DEFAULT '0' COMMENT '状态1正常2关闭',
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='使用教程分类/标签表';
-- ----------------------------
-- Records of app_course_category
-- ----------------------------
BEGIN;
INSERT INTO `app_course_category` (`id`, `icon`, `category_title`, `description`, `first_status`, `type`, `status`, `create_time`, `update_time`) VALUES (1, NULL, '快速指南', NULL, 1, 'category', 1, '2025-10-28 12:06:03', NULL);
COMMIT;
SET FOREIGN_KEY_CHECKS = 1;