phong bat

This commit is contained in:
2024-10-17 15:15:08 +07:00
parent 59923b02cb
commit 5c56e79d63
19 changed files with 456 additions and 145 deletions

View File

@@ -22,22 +22,50 @@ export class CenterSchema extends PothosSchema {
return this.builder.prismaObject('Center', {
description: 'A center in the system.',
fields: (t) => ({
id: t.exposeID('id'),
centerOwnerId: t.exposeID('centerOwnerId'),
name: t.exposeString('name'),
description: t.exposeString('description'),
logoUrl: t.exposeString('logoUrl'),
logoFile: t.relation('logoFile'),
location: t.exposeString('location'),
individual: t.exposeBoolean('individual'),
id: t.exposeID('id', {
description: 'The unique identifier of the center.',
}),
centerOwnerId: t.exposeID('centerOwnerId', {
description: 'The ID of the center owner.',
}),
name: t.exposeString('name', {
description: 'The name of the center.',
}),
description: t.exposeString('description', {
description: 'The description of the center.',
}),
logoUrl: t.exposeString('logoUrl', {
description: 'The URL of the center logo.',
}),
logoFile: t.relation('logoFile', {
description: 'The file associated with the center logo.',
}),
location: t.exposeString('location', {
description: 'The location of the center.',
}),
individual: t.exposeBoolean('individual', {
description: 'Whether the center is an individual center.',
}),
createdAt: t.expose('createdAt', { type: 'DateTime' }),
updatedAt: t.expose('updatedAt', { type: 'DateTime' }),
services: t.relation('services'),
centerOwner: t.relation('centerOwner'),
chatRoom: t.relation('chatRoom'),
centerStaff: t.relation('CenterStaff'),
resume: t.relation('Resume'),
uploadedFileId: t.exposeID('uploadedFileId'),
services: t.relation('services', {
description: 'The services provided by the center.',
}),
centerOwner: t.relation('centerOwner', {
description: 'The owner of the center.',
}),
chatRoom: t.relation('chatRoom', {
description: 'The chat room associated with the center.',
}),
centerStaff: t.relation('CenterStaff', {
description: 'The staff members of the center.',
}),
resume: t.relation('Resume', {
description: 'The resume of the center.',
}),
uploadedFileId: t.exposeID('uploadedFileId', {
description: 'The ID of the uploaded file.',
}),
}),
});
}