nfp_sites/api/staff/model.mjs

29 lines
401 B
JavaScript
Raw Normal View History

2019-09-14 19:03:38 +00:00
import bookshelf from '../bookshelf.mjs'
2019-02-19 11:34:52 +00:00
/* Staff model:
{
id,
username,
password,
fullname,
is_deleted,
level,
created_at,
updated_at,
}
*/
const Staff = bookshelf.createModel({
tableName: 'staff',
}, {
// Hide password from any relations and include requests.
publicFields: bookshelf.safeColumns([
'username',
'fullname',
'level',
]),
})
export default Staff