You've already forked nginx-proxy-manager
							
							
				mirror of
				https://github.com/NginxProxyManager/nginx-proxy-manager.git
				synced 2025-10-30 18:05:34 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			30 lines
		
	
	
		
			508 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			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;
 |