diff --git a/collection/opendb-mall-sku/collection.json b/collection/opendb-mall-sku/collection.json new file mode 100644 index 0000000..bd97304 --- /dev/null +++ b/collection/opendb-mall-sku/collection.json @@ -0,0 +1,40 @@ +{ + "schema": { + "bsonType": "object", + "required": ["goods_id", "sku_name", "price", "stock", "create_date", "update_date"], + "properties": { + "_id": { + "description": "存储文档 ID(SKU ID),系统自动生成" + }, + "goods_id": { + "bsonType": "string", + "description": "商品 id,参考 opendb-mall-goods 表" + }, + "sku_name": { + "bsonType": "string", + "description": "SKU名称" + }, + "price": { + "bsonType": "int", + "description": "价格" + }, + "market_price": { + "bsonType": "int", + "description": "市场价" + }, + "stock": { + "bsonType": "int", + "description": "库存" + }, + "create_date": { + "bsonType": "timestamp", + "description": "创建时间" + }, + "update_date": { + "bsonType": "timestamp", + "description": "修改时间" + } + } + }, + "index": [] +} diff --git a/collection/opendb-mall-sku/package.json b/collection/opendb-mall-sku/package.json new file mode 100644 index 0000000..f5d352b --- /dev/null +++ b/collection/opendb-mall-sku/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opendb/opendb-mall-sku", + "version": "0.0.1", + "description": "opendb-mall-sku", + "keywords": ["电商系统", "SKU"], + "opendb": { + "title": "SKU", + "type": "collection", + "contributors": [ + { + "name": "DCloud", + "email": "", + "homepage": "https://gitee.com/dcloud/opendb" + } + ] + } +} diff --git a/database/opendb-mall/db_init.json b/database/opendb-mall/db_init.json index 2c8dfd5..4813c82 100644 --- a/database/opendb-mall/db_init.json +++ b/database/opendb-mall/db_init.json @@ -2,5 +2,6 @@ "uni-id-users": {}, "opendb-mall-goods": {}, "opendb-mall-categories": {}, - "opendb-mall-comments": {} + "opendb-mall-comments": {}, + "opendb-mall-sku": {} }