ngusidandon
This commit is contained in:
@@ -24,20 +24,36 @@ export class ResumeSchema extends PothosSchema {
|
||||
return this.builder.prismaObject('Resume', {
|
||||
description: 'A resume in the system.',
|
||||
fields: (t) => ({
|
||||
id: t.exposeID('id'),
|
||||
userId: t.exposeID('userId'),
|
||||
centerId: t.exposeID('centerId'),
|
||||
status: t.exposeString('status'),
|
||||
id: t.exposeID('id', {
|
||||
description: 'The ID of the resume.',
|
||||
}),
|
||||
userId: t.exposeID('userId', {
|
||||
description: 'The ID of the user.',
|
||||
}),
|
||||
centerId: t.exposeID('centerId', {
|
||||
description: 'The ID of the center.',
|
||||
}),
|
||||
status: t.expose('status', {
|
||||
type: ResumeStatus,
|
||||
nullable: true,
|
||||
description: 'The status of the resume.',
|
||||
}),
|
||||
createdAt: t.expose('createdAt', {
|
||||
type: 'DateTime',
|
||||
nullable: true,
|
||||
description: 'The date and time the resume was created.',
|
||||
}),
|
||||
updatedAt: t.expose('updatedAt', {
|
||||
type: 'DateTime',
|
||||
nullable: true,
|
||||
description: 'The date and time the resume was updated.',
|
||||
}),
|
||||
center: t.relation('center', {
|
||||
description: 'The center for the resume.',
|
||||
}),
|
||||
resumeFile: t.relation('ResumeFile', {
|
||||
description: 'The resume file for the resume.',
|
||||
}),
|
||||
center: t.relation('center'),
|
||||
resumeFile: t.relation('ResumeFile'),
|
||||
}),
|
||||
});
|
||||
}
|
||||
@@ -53,16 +69,8 @@ export class ResumeSchema extends PothosSchema {
|
||||
resumeId: t.exposeID('resumeId', {
|
||||
description: 'The ID of the resume.',
|
||||
}),
|
||||
fileUrl: t.string({
|
||||
fileUrl: t.exposeString('fileUrl', {
|
||||
description: 'The URL of the resume file.',
|
||||
resolve: async (file, args, ctx) => {
|
||||
// check if fileUrl is still valid
|
||||
return await this.minioService.getNewFileUrl(
|
||||
file.id,
|
||||
'resumes',
|
||||
file.fileUrl,
|
||||
);
|
||||
},
|
||||
}),
|
||||
actualFileName: t.exposeString('actualFileName', {
|
||||
description: 'The original name of the resume file.',
|
||||
|
||||
Reference in New Issue
Block a user