You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

111 lines
2.7 KiB

package es
import "github.com/shopspring/decimal"
type Car struct {
Id uint `json:"id"`
BrokerId uint `json:"brokerId"` // 经纪人
ModelId uint `json:"modelId"` // 车型id
ModelName string `json:"modelName"` // 车型名称
BrandId uint `json:"brandId"` // 品牌id
BrandName string `json:"brandName"` // 品牌名称
Status uint `json:"status"` // 状态 1=正常 2=预定 3=完成 10=取消
TheUpper uint `json:"theUpper"` // 上架 1=未上架 2=已上架 3=下架审核中
Type uint `json:"type"`
MainPhoto string `json:"mainPhoto"`
LicensingDate int64 `json:"licensingDate"`
Price decimal.Decimal `json:"price"`
InteriorPrice decimal.Decimal `json:"interiorPrice"` // 内部价格
ExteriorPrice decimal.Decimal `json:"exteriorPrice"` // 外部价格
DownPayment decimal.Decimal `json:"downPayment"`
Mileage decimal.Decimal `json:"mileage"`
Transfer uint `json:"transfer"`
}
type SearchCarItem struct {
Index string `json:"_index"`
Id string `json:"_id"`
Score float64 `json:"_score"`
Source Car `json:"_source"`
}
/* mapping 文件
{
"mappings": {
"properties": {
"id": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"brokerId": {
"type": "integer"
},
"modelId": {
"type": "integer"
},
"modelName": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
},
"analyzer": "ik_max_word"
},
"brandId": {
"type": "integer"
},
"brandName": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
},
"analyzer": "ik_max_word"
},
"status": {
"type": "integer"
},
"theUpper": {
"type": "integer"
},
"type": {
"type": "integer"
},
"mainPhoto": {
"type": "text"
},
"licensignDate": {
"type": "long"
},
"price": {
"type": "double"
},
"interiorPrice": {
"type": "double"
},
"exteriorPrice": {
"type": "double"
},
"downPayment": {
"type": "double"
},
"mileage": {
"type": "double"
},
"transfer": {
"type": "double"
}
}
}
}`
*/