mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 21:00:31 +00:00
Custom fields feature.
This commit is contained in:
22
server/src/models/ViewRole.js
Normal file
22
server/src/models/ViewRole.js
Normal file
@@ -0,0 +1,22 @@
|
||||
import bookshelf from './bookshelf';
|
||||
|
||||
const ViewRole = bookshelf.Model.extend({
|
||||
/**
|
||||
* Table name.
|
||||
*/
|
||||
tableName: 'view_roles',
|
||||
|
||||
/**
|
||||
* Timestamp columns.
|
||||
*/
|
||||
hasTimestamps: false,
|
||||
|
||||
/**
|
||||
* View role model may belongs to view model.
|
||||
*/
|
||||
view() {
|
||||
return this.belongsTo('View', 'view_id');
|
||||
},
|
||||
});
|
||||
|
||||
export default bookshelf.model('ViewRole', ViewRole);
|
||||
Reference in New Issue
Block a user