phong bat
This commit is contained in:
@@ -24,17 +24,30 @@ export class UploadedFileSchema extends PothosSchema {
|
||||
return this.builder.prismaObject('UploadedFile', {
|
||||
description: 'A file uploaded by a user.',
|
||||
fields: (t) => ({
|
||||
id: t.exposeID('id'),
|
||||
userId: t.exposeID('userId'),
|
||||
fileName: t.exposeString('fileName'),
|
||||
id: t.exposeID('id', {
|
||||
description: 'The ID of the uploaded file.',
|
||||
}),
|
||||
userId: t.exposeID('userId', {
|
||||
description: 'The ID of the user who uploaded the file.',
|
||||
}),
|
||||
fileName: t.exposeString('fileName', {
|
||||
description: 'The name of the file.',
|
||||
}),
|
||||
// expose enum
|
||||
fileType: t.expose('fileType', {
|
||||
type: UploadedFileType,
|
||||
nullable: false,
|
||||
description: 'The type of the file.',
|
||||
}),
|
||||
fileUrl: t.exposeString('fileUrl'),
|
||||
uploadedAt: t.expose('uploadedAt', { type: 'DateTime' }),
|
||||
user: t.relation('user'),
|
||||
uploadedAt: t.expose('uploadedAt', {
|
||||
type: 'DateTime',
|
||||
nullable: true,
|
||||
description: 'The date and time the file was uploaded.',
|
||||
}),
|
||||
user: t.relation('user', {
|
||||
description: 'The user who uploaded the file.',
|
||||
}),
|
||||
}),
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user