mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-14 20:00:33 +00:00
22 lines
439 B
TypeScript
22 lines
439 B
TypeScript
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());
|
|
}
|
|
}
|
|
}
|