mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 04:40:32 +00:00
feat: link and unlink document to resource model
This commit is contained in:
23
packages/server/src/models/Document.ts
Normal file
23
packages/server/src/models/Document.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { mixin } from 'objection';
|
||||
import TenantModel from 'models/TenantModel';
|
||||
import ModelSetting from './ModelSetting';
|
||||
import ModelSearchable from './ModelSearchable';
|
||||
|
||||
export default class Document extends mixin(TenantModel, [
|
||||
ModelSetting,
|
||||
ModelSearchable,
|
||||
]) {
|
||||
/**
|
||||
* Table name
|
||||
*/
|
||||
static get tableName() {
|
||||
return 'documents';
|
||||
}
|
||||
|
||||
/**
|
||||
* Model timestamps.
|
||||
*/
|
||||
get timestamps() {
|
||||
return ['createdAt', 'updatedAt'];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user