Files

30 lines
492 B
JavaScript
Raw Permalink Normal View History

2020-02-19 15:55:06 +11:00
// Objection Docs:
// http://vincit.github.io/objection.js/
2025-09-02 21:43:00 +10:00
import { Model } from "objection";
import db from "../db.js";
import now from "./now_helper.js";
2020-02-19 15:55:06 +11:00
Model.knex(db());
2020-02-19 15:55:06 +11:00
class UserPermission extends Model {
$beforeInsert () {
this.created_on = now();
this.modified_on = now();
2020-02-19 15:55:06 +11:00
}
$beforeUpdate () {
this.modified_on = now();
2020-02-19 15:55:06 +11:00
}
static get name () {
return 'UserPermission';
}
static get tableName () {
return 'user_permission';
}
}
2025-09-02 21:43:00 +10:00
export default UserPermission;