opendb/collection/opendb-mall-sku/collection.json

54 lines
1.3 KiB
JSON
Raw Normal View History

2020-08-20 17:27:01 +08:00
{
"schema": {
"bsonType": "object",
"required": ["goods_id", "sku_name", "price", "stock", "create_date", "update_date"],
"properties": {
"_id": {
"description": "存储文档 IDSKU ID系统自动生成"
},
"goods_id": {
"bsonType": "string",
2020-11-24 16:00:21 +08:00
"description": "商品 id参考 opendb-mall-goods 表",
"foreignKey":"opendb-mall-goods._id"
2020-08-20 17:27:01 +08:00
},
"sku_name": {
"bsonType": "string",
2020-12-23 20:20:34 +08:00
"description": "SKU名称",
"trim":"both"
2020-08-20 17:27:01 +08:00
},
"price": {
"bsonType": "int",
2020-11-24 16:00:21 +08:00
"description": "价格,以分为单位,避免浮点计算的精度问题"
2020-08-20 17:27:01 +08:00
},
"market_price": {
"bsonType": "int",
2020-11-24 16:00:21 +08:00
"description": "市场价,以分为单位,避免浮点计算的精度问题"
2020-08-20 17:27:01 +08:00
},
"stock": {
"bsonType": "int",
"description": "库存"
},
"create_date": {
"bsonType": "timestamp",
"description": "创建时间"
},
"update_date": {
"bsonType": "timestamp",
"description": "修改时间"
}
}
},
2020-11-24 16:00:21 +08:00
"index": [
{
"IndexName": "goods_id_",
"MgoKeySchema": {
"MgoIndexKeys": [{
"Name": "goods_id",
"Direction": "1"
}],
"MgoIsUnique": false
}
}
]
2020-08-20 17:27:01 +08:00
}