opendb/collection/opendb-mall-goods/collection.json
wakary f6512301ac update collection/opendb-mall-goods/collection.json.
商品描述大概格式:
- 富文本混排;
- 纯文字;
- 纯图片;
- 文字段+图片段;

goods_desc本身是能满足这几种要求,基于不同的使用需求,我们配置不同的goods_desc(自己知道如何提取出对应的数据)。

我们建议再傻瓜一点,通过增加goods_imgs来适配更多的使用情况。比如商品的描述全是图片的,可以直接使用使用goods_imgs,文字描述+图片的,可以使用goods_desc+goods_imgs。
2021-05-13 08:36:25 +08:00

130 lines
3.5 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"schema": {
"bsonType": "object",
"required": ["goods_sn", "name", "remain_count", "month_sell_count", "total_sell_count", "comment_count", "is_real", "is_on_sale", "is_alone_sale", "is_best", "is_new", "is_hot"],
"permission": {
"read": "doc.is_on_sale == true",
"create": false,
"update": false,
"delete": false
},
"properties": {
"_id": {
"description": "存储文档 ID商品 ID系统自动生成"
},
"category_id": {
"bsonType": "string",
"description": "分类 id参考`opendb-mall-categories`表",
"foreignKey":"opendb-mall-categories._id"
},
"goods_sn": {
"bsonType": "string",
"description": "商品的唯一货号",
"title": "货号",
"trim":"both"
},
"name": {
"bsonType": "string",
"description": "商品名称",
"title": "名称",
"trim":"both"
},
"keywords": {
"bsonType": "string",
"description": "商品关键字,为搜索引擎收录使用",
"title": "关键字",
"trim":"both"
},
"goods_desc": {
"bsonType": "string",
"description": "商品详细描述",
"title": "详细描述",
"trim":"both"
},
"goods_imgs": {
"bsonType": "array",
"description": "商品详情页的图片描述地址"
},
"goods_thumb": {
"bsonType": "string",
"description": "商品缩略图,用于在列表或搜索结果中预览显示",
"title": "缩略图地址",
"pattern": "^(http://|https://|/|./|@/)\\S",
"trim":"both"
},
"goods_banner_imgs": {
"bsonType": "array",
"description": "商品详情页的banner图地址"
},
"remain_count": {
"bsonType": "int",
"description": "库存数量",
"title": "库存数量"
},
"month_sell_count": {
"bsonType": "int",
"description": "月销量"
},
"total_sell_count": {
"bsonType": "int",
"description": "总销量"
},
"comment_count": {
"bsonType": "int",
"description": "累计评论数"
},
"is_real": {
"bsonType": "bool",
"description": "是否实物",
"title": "是否为实物"
},
"is_on_sale": {
"bsonType": "bool",
"description": "是否上架销售",
"title": "是否上架"
},
"is_alone_sale": {
"bsonType": "bool",
"description": "是否能单独销售;如果不能单独销售,则只能作为某商品的配件或者赠品销售"
},
"is_best": {
"bsonType": "bool",
"description": "是否精品"
},
"is_new": {
"bsonType": "bool",
"description": "是否新品",
"title": "是否新品"
},
"is_hot": {
"bsonType": "bool",
"description": "是否热销"
},
"add_date": {
"bsonType": "timestamp",
"description": "上架时间",
"defaultValue": {
"$env": "now"
}
},
"last_modify_date": {
"bsonType": "timestamp",
"description": "最后修改时间",
"defaultValue": {
"$env": "now"
}
},
"seller_note": {
"bsonType": "string",
"description": "商家备注,仅商家可见",
"trim":"both",
"permission": {
"read": false
}
}
}
},
"data": [],
"index": []
}