import dayjs from 'dayjs' import Store from './store.js' /** * Store for Flow * * @author Björn Hase * @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