opendb/collection/opendb-mall-sku/collection.json
2020-12-23 20:20:34 +08:00

54 lines
1.3 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_id", "sku_name", "price", "stock", "create_date", "update_date"],
"properties": {
"_id": {
"description": "存储文档 IDSKU ID系统自动生成"
},
"goods_id": {
"bsonType": "string",
"description": "商品 id参考 opendb-mall-goods 表",
"foreignKey":"opendb-mall-goods._id"
},
"sku_name": {
"bsonType": "string",
"description": "SKU名称",
"trim":"both"
},
"price": {
"bsonType": "int",
"description": "价格,以分为单位,避免浮点计算的精度问题"
},
"market_price": {
"bsonType": "int",
"description": "市场价,以分为单位,避免浮点计算的精度问题"
},
"stock": {
"bsonType": "int",
"description": "库存"
},
"create_date": {
"bsonType": "timestamp",
"description": "创建时间"
},
"update_date": {
"bsonType": "timestamp",
"description": "修改时间"
}
}
},
"index": [
{
"IndexName": "goods_id_",
"MgoKeySchema": {
"MgoIndexKeys": [{
"Name": "goods_id",
"Direction": "1"
}],
"MgoIsUnique": false
}
}
]
}