feat: 新增关键词类型及优化查询逻辑
支持关键词类型区分,优化文件向量查询SQL及DAO更新逻辑,移除冗余配置和注释代码。
This commit is contained in:
26
consts/keyword/type.go
Normal file
26
consts/keyword/type.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package keyword
|
||||
|
||||
import "github.com/gogf/gf/v2/util/gconv"
|
||||
|
||||
var (
|
||||
KeywordTypeDefined = newKeywordType(gconv.PtrInt8(1), "自定义")
|
||||
KeywordTypeInitial = newKeywordType(gconv.PtrInt8(2), "初始化")
|
||||
)
|
||||
|
||||
type KeywordType *int8
|
||||
|
||||
type keywordType struct {
|
||||
code KeywordType
|
||||
desc string
|
||||
}
|
||||
|
||||
func (s keywordType) Code() KeywordType {
|
||||
return s.code
|
||||
}
|
||||
func (s keywordType) Desc() string {
|
||||
return s.desc
|
||||
}
|
||||
|
||||
func newKeywordType(code KeywordType, desc string) keywordType {
|
||||
return keywordType{code: code, desc: desc}
|
||||
}
|
||||
Reference in New Issue
Block a user