diff --git a/src/main/java/com/project/information/domain/entity/KnowledgeClusterEntity.java b/src/main/java/com/project/information/domain/entity/KnowledgeClusterEntity.java new file mode 100644 index 0000000..d3079b0 --- /dev/null +++ b/src/main/java/com/project/information/domain/entity/KnowledgeClusterEntity.java @@ -0,0 +1,40 @@ +package com.project.information.domain.entity; + + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.project.base.domain.entity.BaseEntity; +import jakarta.persistence.*; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.hibernate.annotations.Comment; + +@Data +@Table(name = "evaluator_knowledge_cluster" , + indexes = {@Index(name = "Idx_informationId", columnList = "information_id")}) +@Entity +@TableName(value = "evaluator_knowledge_cluster", autoResultMap = true) +@EqualsAndHashCode(callSuper = true) +public class KnowledgeClusterEntity extends BaseEntity { + + @TableId(value = "id" , type = IdType.ASSIGN_ID) + @Id + private Long id; + + @Column(name = "information_id") + @TableField("information_id") + @Comment("资料id") + private Long informationId; + + @Column(name = "cluster_topic", length = 2000) + @Comment("簇主题/标签(由AI聚类后总结提取)") + @TableField("cluster_topic") + private String clusterTopic; + + @Column(name = "cluster_size") + @TableField("cluster_size") + @Comment("簇大小(W):该簇包含的知识点个数") + private Integer clusterSize; +} diff --git a/src/main/java/com/project/information/mapper/KnowledgeClusterMapper.java b/src/main/java/com/project/information/mapper/KnowledgeClusterMapper.java new file mode 100644 index 0000000..3cf8fab --- /dev/null +++ b/src/main/java/com/project/information/mapper/KnowledgeClusterMapper.java @@ -0,0 +1,9 @@ +package com.project.information.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.project.information.domain.entity.KnowledgeClusterEntity; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface KnowledgeClusterMapper extends BaseMapper { +} diff --git a/src/main/java/com/project/question/domain/entity/TaskKnowledgeClusterEntity.java b/src/main/java/com/project/question/domain/entity/TaskKnowledgeClusterEntity.java index b9c3264..c33a975 100644 --- a/src/main/java/com/project/question/domain/entity/TaskKnowledgeClusterEntity.java +++ b/src/main/java/com/project/question/domain/entity/TaskKnowledgeClusterEntity.java @@ -26,10 +26,15 @@ public class TaskKnowledgeClusterEntity extends BaseEntity { @Comment("所属考试任务ID") private Long taskId; - @Column(name = "cluster_topic", length = 512) + + @Column(name = "information_id") + @TableField("information_id") + @Comment("资料id") + private Long informationId; + + @Column(name = "cluster_topic", length = 2000) @Comment("簇主题/标签(由AI聚类后总结提取)") @TableField("cluster_topic") - private String clusterTopic; @Column(name = "cluster_size")