mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 04:10:32 +00:00
add server to monorepo.
This commit is contained in:
21
packages/server/src/models/Setting.ts
Normal file
21
packages/server/src/models/Setting.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
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());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user