feat(server): add pdf template crud endpoints

This commit is contained in:
Ahmed Bouhuolia
2024-09-11 14:54:13 +02:00
parent 5b6270a184
commit c0769662bd
14 changed files with 542 additions and 2 deletions

View File

@@ -0,0 +1,42 @@
import TenantModel from 'models/TenantModel';
export class PdfTemplate extends TenantModel {
/**
* Table name.
*/
static get tableName() {
return 'pdf_templates';
}
/**
* Timestamps columns.
*/
get timestamps() {
return ['createdAt', 'updatedAt'];
}
static get jsonSchema() {
return {
type: 'object',
properties: {
id: { type: 'integer' },
templateName: { type: 'string' },
attributes: { type: 'object' }, // JSON field definition
},
};
}
/**
* Virtual attributes.
*/
static get virtualAttributes() {
return [];
}
/**
* Relationship mapping.
*/
static get relationMappings() {
return {};
}
}