mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
30 lines
511 B
JavaScript
30 lines
511 B
JavaScript
import { Model } from 'objection';
|
|
import TenantModel from '@/models/TenantModel';
|
|
|
|
export default class Customer extends TenantModel {
|
|
/**
|
|
* Table name
|
|
*/
|
|
static get tableName() {
|
|
return 'customers';
|
|
}
|
|
|
|
/**
|
|
* Model timestamps.
|
|
*/
|
|
static get timestamps() {
|
|
return ['createdAt', 'updatedAt'];
|
|
}
|
|
|
|
/**
|
|
* Model modifiers.
|
|
*/
|
|
static get modifiers() {
|
|
return {
|
|
filterCustomerIds(query, customerIds) {
|
|
query.whereIn('id', customerIds);
|
|
},
|
|
};
|
|
}
|
|
}
|