Browse Source

单价文件唯一限制

zhangweicheng 7 years ago
parent
commit
c2e5b8d872
1 changed files with 1 additions and 1 deletions
  1. 1 1
      modules/all_models/unit_price.js

+ 1 - 1
modules/all_models/unit_price.js

@@ -11,7 +11,7 @@ let Schema = mongoose.Schema;
 let collectionName = 'unit_price';
 let modelSchema = {
     // 自增ID
-    id: Number,
+    id: {type:Number,unique: true},
     // 基价单价
     base_price: String,
     // 市场单价