Files
2025-11-19 14:24:13 +08:00

95 lines
4.3 KiB
Go

package document
type User struct {
Id string
Mobile string
RegionCode string
NickName string
Salt string
Password string
Status string
Avatar string
Gender string
Birthday string
WxUnionId string
QqOpenId string
MarketChannel string
CreateTime string
IsActive string
ActiveTime string
SignupSource string
SignupDevicePlatform string
SignupDeviceUdid string
IdNo string
IsAuth string
TrueName string
Sign string
ViewFlag string
VideoUrl string
School string
UserNo string
BankName string
BankUserName string
BankBranchName string
BankCardNo string
AuthFailReason string
AlipayAccount string
WellNoIcon string
}
// 字符串: text keyword
// 整数 : byte, short, integer, long
// 浮点数: float, double
// 布尔型: boolean
// 日期: date
var UserIndex = map[string]any{
"settings": map[string]any{"number_of_shards": 5, "number_of_replicas": 1},
"mappings": map[string]any{
"properties": map[string]any{
"ActiveTime": map[string]string{"type": "date", "format": "yyyy-MM-dd HH:mm:ssZ||yyyy-MM-dd HH:mm:ss.SSSZ||yyyy-MM-ddZ||epoch_millis||epoch_second"},
"AlipayAccount": map[string]string{"type": "keyword"},
"AuthFailReason": map[string]string{"type": "text", "analyzer": "ik_max_word"},
"Avatar": map[string]string{"type": "text", "analyzer": "ik_max_word"},
"BankBranchName": map[string]string{"type": "keyword"},
"BankCardNo": map[string]string{"type": "keyword"},
"BankName": map[string]string{"type": "text"},
"BankUserName": map[string]string{"type": "text"},
"Birthday": map[string]string{"type": "date", "format": "yyyy-MM-dd HH:mm:ssZ||yyyy-MM-dd HH:mm:ss.SSSZ||yyyy-MM-ddZ||epoch_millis||epoch_second"},
"CreateTime": map[string]string{"type": "date", "format": "yyyy-MM-dd HH:mm:ssZ||yyyy-MM-dd HH:mm:ss.SSSZ||yyyy-MM-ddZ||epoch_millis||epoch_second"},
"Gender": map[string]string{"type": "keyword"},
"Id": map[string]string{"type": "keyword"},
"IdNo": map[string]string{"type": "keyword"},
"IsActive": map[string]string{"type": "keyword"},
"IsAuth": map[string]string{"type": "keyword"},
"MarketChannel": map[string]string{"type": "keyword"},
"Mobile": map[string]string{"type": "keyword"},
"NickName": map[string]string{"type": "text", "analyzer": "ik_max_word"},
"QqOpenId": map[string]string{"type": "keyword"},
"RegionCode": map[string]string{"type": "keyword"},
"Salt": map[string]string{"type": "keyword"},
"School": map[string]string{"type": "text", "analyzer": "ik_max_word"},
"Sign": map[string]string{"type": "text", "analyzer": "ik_max_word"},
"SignupDevicePlatform": map[string]string{"type": "text", "analyzer": "ik_max_word"},
"SignupDeviceUdid": map[string]string{"type": "keyword"},
"SignupSource": map[string]string{"type": "text", "analyzer": "ik_max_word"},
"Status": map[string]string{"type": "keyword"},
"TrueName": map[string]string{"type": "text", "analyzer": "ik_max_word"},
"UserNo": map[string]string{"type": "keyword"},
"VideoUrl": map[string]string{"type": "text", "analyzer": "ik_max_word"},
"ViewFlag": map[string]string{"type": "keyword"},
"WellNoIcon": map[string]string{"type": "keyword"},
"WxUnionId": map[string]string{"type": "keyword"},
},
},
}
var MessageIndex = map[string]any{
"settings": map[string]any{"number_of_shards": 5, "number_of_replicas": 1},
"mappings": map[string]any{
"properties": map[string]any{
"id": map[string]string{"type": "keyword"},
"curTime": map[string]string{"type": "date", "format": "yyyy-MM-dd HH:mm:ssZ||yyyy-MM-dd HH:mm:ss.SSSZ||yyyy-MM-ddZ||epoch_millis||epoch_second"},
},
},
}