|
@@ -78,7 +78,7 @@ ${has_Secret ? "const { Secret } = require('naf-framework-mongoose-free/lib/mode
|
|
${pluginHead}
|
|
${pluginHead}
|
|
// ${name_zh || ''}
|
|
// ${name_zh || ''}
|
|
${columnStr}
|
|
${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({ id: 1 });
|
|
schema.index({ 'meta.createdAt': 1 });
|
|
schema.index({ 'meta.createdAt': 1 });
|
|
${indexStr}
|
|
${indexStr}
|