regist channel schema

This commit is contained in:
liugq 2022-07-04 16:36:36 +08:00
parent 248e38977a
commit 14f1f0ed65
1 changed files with 2 additions and 2 deletions

View File

@ -9,9 +9,9 @@ import "infini.sh/framework/core/orm"
type Channel struct { type Channel struct {
orm.ORMObjectBase orm.ORMObjectBase
Name string `json:"name" elastic_mapping:"name:{type:keyword,copy_to:search_text}"` Name string `json:"name" elastic_mapping:"name:{type:keyword,copy_to:search_text}"`
Type string `json:"type" elastic_mapping:"name:{type:keyword,copy_to:search_text}"` // email or webhook Type string `json:"type" elastic_mapping:"type:{type:keyword,copy_to:search_text}"` // email or webhook
Priority int `json:"priority,omitempty"` Priority int `json:"priority,omitempty"`
Webhook *CustomWebhook `json:"webhook,omitempty"` Webhook *CustomWebhook `json:"webhook,omitempty" elastic_mapping:"webhook:{type:object}"`
SearchText string `json:"-" elastic_mapping:"search_text:{type:text,index_prefixes:{},index_phrases:true, analyzer:suggest_text_search }"` SearchText string `json:"-" elastic_mapping:"search_text:{type:text,index_prefixes:{},index_phrases:true, analyzer:suggest_text_search }"`
} }