feat: add certificate generation system with PDF template and Thai font support

This commit is contained in:
JakkrapartXD 2026-01-30 14:14:00 +07:00
parent c72b76c2a5
commit 9ed2347843
8 changed files with 440 additions and 0 deletions

View 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;
}[];
}