소스 검색

默认值

reloaded 5 년 전
부모
커밋
5fced9099c
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      app/model/comment.js

+ 1 - 1
app/model/comment.js

@@ -8,7 +8,7 @@ const CommentSchema = {
   uid: { type: String, required: true, maxLength: 500 }, // 用户ID
   content: { type: String, required: true }, // 评论内容
   public_time: { type: String, required: false, maxLength: 500 }, // 发布时间
-  status: { type: String, required: false, maxLength: 100 }, // 状态,0-未审核,1-审核通过,2-审核拒绝
+  status: { type: String, required: false, maxLength: 100, default: '0' }, // 状态,0-未审核,1-审核通过,2-审核拒绝
 };