2022-12-07 15:00:02 +00:00
|
|
|
import { ObjectType, ID, Field } from '@nestjs/graphql';
|
|
|
|
|
|
|
|
|
|
@ObjectType()
|
|
|
|
|
export class User {
|
|
|
|
|
@Field(() => ID, {
|
2023-01-09 12:13:45 +00:00
|
|
|
description: 'ID of the user',
|
2022-12-07 15:00:02 +00:00
|
|
|
})
|
2023-01-09 12:13:45 +00:00
|
|
|
id: string;
|
2022-12-07 15:00:02 +00:00
|
|
|
|
|
|
|
|
@Field({
|
|
|
|
|
nullable: true,
|
2023-01-09 12:13:45 +00:00
|
|
|
description: 'Name of the user (if fetched)',
|
2022-12-07 15:00:02 +00:00
|
|
|
})
|
2023-01-09 12:13:45 +00:00
|
|
|
name?: string;
|
2022-12-07 15:00:02 +00:00
|
|
|
|
|
|
|
|
@Field({
|
|
|
|
|
nullable: true,
|
2023-01-09 12:13:45 +00:00
|
|
|
description: 'Email of the user (if fetched)',
|
2022-12-07 15:00:02 +00:00
|
|
|
})
|
|
|
|
|
email?: string;
|
|
|
|
|
|
|
|
|
|
@Field({
|
|
|
|
|
nullable: true,
|
2023-01-09 12:13:45 +00:00
|
|
|
description: 'URL to the profile photo of the user (if fetched)',
|
2022-12-07 15:00:02 +00:00
|
|
|
})
|
2023-01-09 12:13:45 +00:00
|
|
|
image?: string;
|
|
|
|
|
|
|
|
|
|
@Field({
|
|
|
|
|
nullable: true,
|
|
|
|
|
description: 'Flag to determine if user is an Admin or not',
|
|
|
|
|
})
|
|
|
|
|
isAdmin?: string;
|
|
|
|
|
|
|
|
|
|
@Field({
|
|
|
|
|
nullable: true,
|
|
|
|
|
description: 'Date when the user account was created',
|
|
|
|
|
})
|
|
|
|
|
createdOn?: string;
|
2022-12-07 15:00:02 +00:00
|
|
|
}
|