serv\web-侧边栏 标签统一

This commit is contained in:
2025-10-27 16:21:00 +08:00
parent e50de4a277
commit 5fa4e1cd42
47 changed files with 1933 additions and 1307 deletions

View File

@@ -20,8 +20,8 @@ export interface Resource extends BaseDTO {
summary?: string;
/** 封面图片 */
coverImage?: string;
/** 分类ID */
categoryID?: string;
/** 标签ID文章分类标签tagType=1 */
tagID?: string;
/** 作者 */
author?: string;
/** 来源 */
@@ -81,10 +81,11 @@ export interface Banner extends BaseDTO {
/**
* 资源分类实体
* @deprecated 已废弃,请使用 Tag 接口tagType=1表示文章分类标签
*/
export interface ResourceCategory extends BaseDTO {
/** 分类唯一标识 */
categoryID?: string;
tagID?: string;
/** 分类名称 */
name?: string;
/** 父分类ID */
@@ -111,6 +112,18 @@ export interface ResourceTag extends BaseDTO {
tagID?: string;
}
/**
* 标签类型枚举
*/
export enum TagType {
/** 文章分类标签 */
ARTICLE_CATEGORY = 1,
/** 课程分类标签 */
COURSE_CATEGORY = 2,
/** 学习任务分类标签 */
LEARNING_TASK_CATEGORY = 3
}
/**
* 标签实体
*/
@@ -123,15 +136,21 @@ export interface Tag extends BaseDTO {
description?: string;
/** 标签颜色 */
color?: string;
/** 标签类型1-文章分类标签 2-课程分类标签 3-学习任务分类标签) */
tagType?: number;
/** 排序号 */
orderNum?: number;
/** 状态0禁用 1启用 */
status?: number;
/** 创建者 */
creator?: string;
/** 更新者 */
updater?: string;
}
export interface ResourceVO extends BaseDTO{
resource: Resource;
category: ResourceCategory;
tags: Tag[];
}
export interface tagVO extends BaseDTO{
@@ -198,8 +217,8 @@ export interface DataCollectionLog extends BaseDTO {
export interface ResourceSearchParams {
/** 关键词 */
keyword?: string;
/** 分类ID */
categoryID?: string;
/** 标签ID文章分类标签tagType=1 */
tagID?: string;
/** 状态 */
status?: number;
/** 是否推荐 */

View File

@@ -71,11 +71,18 @@ export interface CourseChapter extends BaseDTO {
/**
* 课程标签关联实体
*
* 说明课程标签使用统一的标签系统tb_tag表
* - 使用 tagType=2 表示课程分类标签
* - 通过 resourceTagApi.getTagsByType(2) 或 resourceTagApi.getTagsByType(TagType.COURSE_CATEGORY) 获取课程分类标签
*
* @see Tag - 标签实体定义
* @see TagType - 标签类型枚举COURSE_CATEGORY = 2
*/
export interface CourseTag extends BaseDTO {
/** 课程ID */
courseID?: string;
/** 标签ID */
/** 标签ID(关联 tb_tag 表tagType=2 的标签) */
tagID?: string;
/** 创建者 */
creator?: string;
@@ -124,6 +131,13 @@ export interface CourseVO extends BaseDTO {
/**
* 学习任务实体
*
* 说明学习任务分类使用统一的标签系统tb_tag表
* - 使用 tagType=3 表示学习任务分类标签
* - 通过 resourceTagApi.getTagsByType(3) 或 resourceTagApi.getTagsByType(TagType.LEARNING_TASK_CATEGORY) 获取学习任务分类标签
*
* @see Tag - 标签实体定义
* @see TagType - 标签类型枚举LEARNING_TASK_CATEGORY = 3
*/
export interface LearningTask extends BaseDTO {
/** 任务唯一标识 */