Files
hoppscotch/packages/hoppscotch-backend/src/user/user.model.ts
2023-01-09 18:56:40 +05:30

38 lines
701 B
TypeScript

import { ObjectType, ID, Field } from '@nestjs/graphql';
@ObjectType()
export class User {
@Field(() => ID, {
description: 'ID of the user',
})
id: string;
@Field({
nullable: true,
description: 'Name of the user (if fetched)',
})
name?: string;
@Field({
nullable: true,
description: 'Email of the user (if fetched)',
})
email?: string;
@Field({
nullable: true,
description: 'URL to the profile photo of the user (if fetched)',
})
image?: string;
@Field({
description: 'Flag to determine if user is an Admin or not',
})
isAdmin: boolean;
@Field({
description: 'Date when the user account was created',
})
createdOn: Date;
}