UNPKG
bookshelf-paranoia
Version:
latest (0.13.1)
0.13.1
0.13.0
0.12.1
0.12.0
0.11.1
0.11.0
0.10.4
0.10.3
0.10.2
0.10.1
0.10.0
0.9.0
0.8.0
0.7.0
0.5.0
0.4.0
0.3.0
0.2.0
0.1.0
0.0.0
Soft delete data from your database
github.com/estate/bookshelf-paranoia
estate/bookshelf-paranoia
bookshelf-paranoia
/
test
/
db
/
models
/
comment.js
17 lines
(12 loc)
•
265 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
'use strict'
let
db =
require
(
'../'
)
module
.
exports
= db.
bookshelf
.
model
(
'Comment'
, {
tableName
:
'comments'
,
softDelete
:
true
,
user
:
function
(
) {
return
this
.
belongsTo
(
'User'
) },
article
:
function
(
) {
return
this
.
belongsTo
(
'Article'
) } })