package org.dromara.knowledge.domain.bo;

import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.knowledge.domain.KnowledgeFragment;

/**
 * 知识库片段业务对象 knowledge_fragment
 *
 * @author pengles
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = KnowledgeFragment.class, reverseConvertGenerate = false)
public class KnowledgeFragmentBo extends BaseEntity {

    /**
     * 主键ID
     */
    @NotNull(message = "主键ID不能为空", groups = {EditGroup.class})
    private Long id;

    /**
     * 知识库ID
     */
    @NotBlank(message = "知识库ID不能为空", groups = {AddGroup.class, EditGroup.class})
    private String knowledgeId;

    /**
     * 文档ID
     */
    @NotBlank(message = "文档ID不能为空", groups = {AddGroup.class, EditGroup.class})
    private String docId;

    /**
     * 知识片段ID
     */
    @NotBlank(message = "知识片段ID不能为空", groups = {AddGroup.class, EditGroup.class})
    private String fid;

    /**
     * 片段索引下标
     */
    private Integer idx;

    /**
     * 片段内容
     */
    @NotBlank(message = "片段内容不能为空", groups = {AddGroup.class, EditGroup.class})
    private String content;

    /**
     * 备注
     */
    private String remark;

}