feat: add certificate generation system with PDF template and Thai font support
This commit is contained in:
parent
c72b76c2a5
commit
9ed2347843
8 changed files with 440 additions and 0 deletions
53
Backend/src/types/certificate.types.ts
Normal file
53
Backend/src/types/certificate.types.ts
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
// ============================================
|
||||
// Certificate Types
|
||||
// ============================================
|
||||
|
||||
export interface GenerateCertificateInput {
|
||||
token: string;
|
||||
course_id: number;
|
||||
}
|
||||
|
||||
export interface GenerateCertificateResponse {
|
||||
code: number;
|
||||
message: string;
|
||||
data?: {
|
||||
certificate_id: number;
|
||||
file_path: string;
|
||||
download_url: string;
|
||||
issued_at: Date;
|
||||
};
|
||||
}
|
||||
|
||||
export interface GetCertificateInput {
|
||||
token: string;
|
||||
course_id: number;
|
||||
}
|
||||
|
||||
export interface GetCertificateResponse {
|
||||
code: number;
|
||||
message: string;
|
||||
data?: {
|
||||
certificate_id: number;
|
||||
course_id: number;
|
||||
course_title: { th: string; en: string };
|
||||
file_path: string;
|
||||
download_url: string;
|
||||
issued_at: Date;
|
||||
};
|
||||
}
|
||||
|
||||
export interface ListMyCertificatesInput {
|
||||
token: string;
|
||||
}
|
||||
|
||||
export interface ListMyCertificatesResponse {
|
||||
code: number;
|
||||
message: string;
|
||||
data: {
|
||||
certificate_id: number;
|
||||
course_id: number;
|
||||
course_title: { th: string; en: string };
|
||||
download_url: string;
|
||||
issued_at: Date;
|
||||
}[];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue