You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
694 B

import dayjs from 'dayjs'
import Store from './store.js'
/**
* Store for Flow
*
* @author Björn Hase <me@herr-hase.wtf>
* @license hhttps://www.gnu.org/licenses/gpl-3.0.en.html GPL-3
* @link https://git.node001.net/HerrHase/signpost.git
*
*/
class FlowStore extends Store {
constructor(db) {
super(db, 'flows')
}
/**
*
*
*/
create(data, hash) {
data.date_created_at = dayjs().toISOString()
return super.create(data)
}
/**
*
*
*/
findOneByUuid(uuid) {
return this._db.prepare('SELECT * FROM ' + this._tableName + ' WHERE uuid = ?')
.get(uuid)
}
}
export default FlowStore