mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-06-15 01:49:10 +00:00
first sync
This commit is contained in:
parent
5d6f382c8a
commit
a4acc441ea
52 changed files with 28315 additions and 0 deletions
10
Server/util/model-methods.js
Normal file
10
Server/util/model-methods.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
const ksuid = require('ksuid')
|
||||
|
||||
module.exports = {
|
||||
ksuid (field = 'id') {
|
||||
return async function () {
|
||||
this.id = await ksuid.random()
|
||||
return this
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue