Files
nginx-proxy-manager/backend/models/user_permission.js
2024-04-19 11:42:01 +02:00

30 lines
498 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;