CertificateTemplate
A named, tenant-owned customization of one built-in CertificateDesign.
| Table | certificate_template |
| Tenant-scoped | Yes — extends TenantOwned |
| Columns | 15 |
| Relationships | 0 |
| Source | backend/src/main/java/com/motorph/payroll/model/CertificateTemplate.java |
Columns
| Field | Type | Column | Null | Notes |
|---|---|---|---|---|
certificateTemplateId | Integer | certificate_template_id | — | primary key, generated |
name | String | name | — | — |
description | String | description | Yes | — |
designKey | CertificateDesign | design_key | — | enum |
accentColor | String | accent_color | Yes | — |
signatoryName | String | signatory_name | Yes | — |
signatoryTitle | String | signatory_title | Yes | — |
customMessage | String | custom_message | Yes | — |
showLogo | Boolean | show_logo | — | — |
showQr | Boolean | show_qr | — | — |
isActive | Boolean | is_active | — | — |
createdBy | String | created_by | Yes | — |
createdAt | LocalDateTime | created_at | — | — |
lastModifiedBy | String | last_modified_by | Yes | — |
lastModifiedDate | LocalDateTime | last_modified_date | Yes | — |
Plus tenant_id, inherited from TenantOwned. Hibernate stamps it on insert and adds where tenant_id = ? to every query, so it is never written or read by application code.
Repository
CertificateTemplateRepository
Declared over CertificateTemplate with id type Integer. Source: backend/src/main/java/com/motorph/payroll/repository/CertificateTemplateRepository.java
| Method | Returns | Notes |
|---|---|---|
findAllByOrderByNameAsc() | List<CertificateTemplate> | derived |
existsByNameIgnoreCase(String name) | boolean | derived |
existsByNameIgnoreCaseAndCertificateTemplateIdNot(String name, Integer certificateTemplateId) | boolean | derived |
findFirstByIsActiveTrue() | Optional<CertificateTemplate> | derived |
findAllByIsActiveTrue() | List<CertificateTemplate> | derived |
Reached by
These controllers hold — directly or through a service they depend on — a repository over CertificateTemplate.
| Controller | Base path | Endpoints | Module |
|---|---|---|---|
| CertificateTemplateController | /api/certificate-templates | 8 | HR |
| RecognitionAwardController | /api/recognition-awards | 7 | HR |
Generated page
This page is rebuilt from the source on every docs build by docs-site/scripts/gen-code-wiki.mjs. Editing it has no effect — change the code, or, if what you want to say is prose, write it in docs/.