Browse Source

删除信息表栏目名称字段

reloaded 5 years ago
parent
commit
9feb925604
2 changed files with 4 additions and 8 deletions
  1. 4 7
      app/controller/.news.js
  2. 0 1
      app/model/news.js

+ 4 - 7
app/controller/.news.js

@@ -1,7 +1,6 @@
 module.exports = {
   create: {
     requestBody: [
-      '!column_name',
       '!column_id',
       '!title',
       '!orgin',
@@ -16,11 +15,10 @@ module.exports = {
   update: {
     params: ['!id'],
     requestBody: [
-      '!column_name',
-      '!column_id',
-      '!title',
-      '!orgin',
-      '!content',
+      'column_id',
+      'title',
+      'orgin',
+      'content',
       'picture'
     ]
   },
@@ -33,7 +31,6 @@ module.exports = {
   index: {
     parameters: {
       query: {
-        column_name : '!column_name',
         column_id : '!column_id',
         title : '!title',
         orgin : '!orgin',

+ 0 - 1
app/model/news.js

@@ -4,7 +4,6 @@ const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
 
 // 信息表
 const NewsSchema = {
-  column_name: { type: String, required: true, maxLength: 500 }, // 栏目名称
   column_id: { type: String, required: true, maxLength: 500 }, // 栏目id
   title: { type: String, required: true, maxLength: 500 }, // 标题
   orgin: { type: String, required: true, maxLength: 500 }, // 来源