lrf 2 년 전
부모
커밋
166581ca45
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      app/public/table-template.js

+ 1 - 1
app/public/table-template.js

@@ -78,7 +78,7 @@ ${has_Secret ? "const { Secret } = require('naf-framework-mongoose-free/lib/mode
 ${pluginHead}
 // ${name_zh || ''}
 ${columnStr}
-const schema = new Schema(${name}, { toJSON: { virtuals: true } });
+const schema = new Schema(${name}, { toJSON: { getter: true, virtuals: true } });
 schema.index({ id: 1 });
 schema.index({ 'meta.createdAt': 1 });
 ${indexStr}