nginx-proxy-manager/backend/models/user_permission.js
2020-07-19 20:03:53 +02:00

30 lines
508 B
JavaScript

// Objection Docs:
// http://vincit.github.io/objection.js/
const db = require('../db');
const Model = require('objection').Model;
const now = require('./now_helper');
Model.knex(db);
class UserPermission extends Model {
$beforeInsert () {
this.created_on = now();
this.modified_on = now();
}
$beforeUpdate () {
this.modified_on = now();
}
static get name () {
return 'UserPermission';
}
static get tableName () {
return 'user_permission';
}
}
module.exports = UserPermission;