Browse Source

food schema add type data

maguohua 8 years ago
parent
commit
99278f7635
2 changed files with 2 additions and 3 deletions
  1. 1 3
      README.md
  2. 1 0
      models/shopping/food.js

+ 1 - 3
README.md

@@ -34,9 +34,7 @@ cd node-elm
 
 npm install
 
-npm run dev (需开启本地mongodb)
-如果没有安装mongodb,可以运行 npm run online 连接线上mongodb
-
+npm run dev (需开启本地mongodb,如果没有安装mongodb,可以运行 npm run online 连接线上数据库)
 
 访问: http://localhost:8001
 

+ 1 - 0
models/shopping/food.js

@@ -10,6 +10,7 @@ const foodSchema = new Schema({
 	name: {type: String, isRequired: true},
 	id:  {type: Number, isRequired: true},
 	restaurant_id: {type: Number, isRequired: true},
+	type: {type: Number, default: 1},
 	foods: [
 		{
 			rating: {type: Number, default: 0},