mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 04:40:32 +00:00
feat: remove Webpack and depend on nodemon. feat: refactoring expenses. feat: optimize system users with caching. feat: architecture tenant optimize.
22 lines
439 B
JavaScript
22 lines
439 B
JavaScript
import TenantModel from 'models/TenantModel';
|
|
import Auth from './Auth';
|
|
|
|
export default class Setting extends TenantModel {
|
|
/**
|
|
* Table name
|
|
*/
|
|
static get tableName() {
|
|
return 'settings';
|
|
}
|
|
|
|
/**
|
|
* Extra metadata query to query with the current authenticate user.
|
|
* @param {Object} query
|
|
*/
|
|
static extraMetadataQuery(query) {
|
|
if (Auth.isLogged()) {
|
|
query.where('user_id', Auth.userId());
|
|
}
|
|
}
|
|
}
|