diff --git a/src/models/post/index.ts b/src/models/post/index.ts index f301365..9e98622 100644 --- a/src/models/post/index.ts +++ b/src/models/post/index.ts @@ -21,12 +21,15 @@ const metaSchema = new Schema({ modifiedAt: { type: Date, default: Date.now }, }); -const postSchema = new Schema({ - id: { type: String, required: true }, - title: { type: String, required: true }, - contents: { type: Array, default: [] }, - meta: metaSchema, -}); +const postSchema = new Schema( + { + id: { type: String, required: true }, + title: { type: String, required: true }, + contents: { type: Array, default: [] }, + meta: metaSchema, + }, + { minimize: false } +); const PostModel = model('Post', postSchema);