0.0.2 • Published 5 years ago

sg-paranoid-plugin v0.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

sg-paranoid-plugin

슬로그업 ddd 의 infra layer 에서 도큐먼트 삭제시 플래그 값으로 도큐먼트 삭제 여부를 판단할 수 있도록 도와주는 모듈입니다.

Installation

npm install --save sg-paranoid-plugin

Example

const mongoose = require('mongoose');

const schema = new mongoose.Schema({
  firstName: { type: String },
  lastName: { type: String }
}, {
  paranoid: true,
});