// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.

package model

import (
	"time"
)

const TableNameKnowledgeUnitSegment = "knowledge_unit_segments"

// KnowledgeUnitSegment mapped from table <knowledge_unit_segments>
type KnowledgeUnitSegment struct {
	ID              int64     `gorm:"column:id;primaryKey;autoIncrement:true;comment:主键" json:"id"`              // 主键
	KnowledgeID     int64     `gorm:"column:knowledge_id;not null;comment:知识库ID" json:"knowledge_id"`            // 知识库ID
	KnowledgeUnitID int64     `gorm:"column:knowledge_unit_id;not null;comment:知识单元ID" json:"knowledge_unit_id"` // 知识单元ID
	Value           string    `gorm:"column:value;not null;comment:知识单元分段内容" json:"value"`                       // 知识单元分段内容
	Embedding       string    `gorm:"column:embedding;not null;comment:知识单元分段内容向量" json:"embedding"`             // 知识单元分段内容向量
	CreatedAt       time.Time `gorm:"column:created_at;default:CURRENT_TIMESTAMP" json:"created_at"`
	UpdatedAt       time.Time `gorm:"column:updated_at;default:CURRENT_TIMESTAMP" json:"updated_at"`
}

// TableName KnowledgeUnitSegment's table name
func (*KnowledgeUnitSegment) TableName() string {
	return TableNameKnowledgeUnitSegment
}
