package org.dromara.knowledge.domain.bo;

import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
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.KnowledgeVector;

/**
 * 知识片段向量业务对象 knowledge_vector
 *
 * @author pengles
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = KnowledgeVector.class, reverseConvertGenerate = false)
public class KnowledgeVectorBo 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 fragmentId;

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

    /**
     * 向量数据
     */
    @Size(max = 65535, message = "向量数据长度不能超过65535个字符")
    private String vectorData;

    /**
     * 向量维度
     */
    @NotNull(message = "向量维度不能为空", groups = {AddGroup.class, EditGroup.class})
    @Min(value = 1, message = "向量维度必须大于0")
    private Integer dimension;

    /**
     * 模型名称
     */
    @NotBlank(message = "模型名称不能为空", groups = {AddGroup.class, EditGroup.class})
    @Size(max = 100, message = "模型名称长度不能超过100个字符")
    private String modelName;

    /**
     * 状态（0正常 1停用）
     */
    private Integer status;

    /**
     * 备注
     */
    @Size(max = 500, message = "备注长度不能超过500个字符")
    private String remark;

}