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.KnowledgeSchema;

/**
 * 知识库数据模型业务对象 knowledge_schema
 *
 * @author pengles
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = KnowledgeSchema.class, reverseConvertGenerate = false)
public class KnowledgeSchemaBo extends BaseEntity {

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

    /**
     * 分组ID
     */
    private Long schemaGroupId;

    /**
     * 模型名称
     */
    @NotBlank(message = "模型名称不能为空", groups = {AddGroup.class, EditGroup.class})
    private String name;

    /**
     * 模型编码
     */
    @NotBlank(message = "模型编码不能为空", groups = {AddGroup.class, EditGroup.class})
    private String code;

    /**
     * 表名
     */
    @NotBlank(message = "表名不能为空", groups = {AddGroup.class, EditGroup.class})
    private String tableName;

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

}