guhongwei 4 years ago
parent
commit
646007d7b0
2 changed files with 4 additions and 2 deletions
  1. 3 2
      app/controller/.flower.js
  2. 1 0
      app/model/flower.js

+ 3 - 2
app/controller/.flower.js

@@ -1,6 +1,6 @@
 module.exports = {
   create: {
-    requestBody: ["!name", "type"],
+    requestBody: ["!name", "type", "dock_id"],
   },
   destroy: {
     params: ["!id"],
@@ -8,7 +8,7 @@ module.exports = {
   },
   update: {
     params: ["!id"],
-    requestBody: ["name", "type"],
+    requestBody: ["name", "type", "dock_id"],
   },
   show: {
     parameters: {
@@ -21,6 +21,7 @@ module.exports = {
       query: {
         name: "name",
         type: "type",
+        dock_id: "dock_id",
       },
     },
     service: "query",

+ 1 - 0
app/model/flower.js

@@ -6,6 +6,7 @@ const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
 const FlowerSchema = {
   name: { type: String, required: true, maxLength: 500 }, // 名称
   type: { type: String, required: false, maxLength: 500 }, // 类别
+  dock_id: { type: String, required: false, maxLength: 500 }, // 展会id
 };