mirror of
https://github.com/Alvin-Zilverstand/nginx-proxy-manager.git
synced 2026-11-23 22:53:09 +01:00
31 lines
553 B
JavaScript
31 lines
553 B
JavaScript
// Objection Docs:
|
|
// http://vincit.github.io/objection.js/
|
|
|
|
'use strict';
|
|
|
|
const db = require('../db');
|
|
const Model = require('objection').Model;
|
|
|
|
Model.knex(db);
|
|
|
|
class AuditLog extends Model {
|
|
$beforeInsert () {
|
|
this.created_on = Model.raw('NOW()');
|
|
this.modified_on = Model.raw('NOW()');
|
|
}
|
|
|
|
$beforeUpdate () {
|
|
this.modified_on = Model.raw('NOW()');
|
|
}
|
|
|
|
static get name () {
|
|
return 'AuditLog';
|
|
}
|
|
|
|
static get tableName () {
|
|
return 'audit_log';
|
|
}
|
|
}
|
|
|
|
module.exports = AuditLog;
|