Files
hoppscotch/packages/hoppscotch-backend/src/user-request/user-request.model.ts
Mir Arif Hasan ccdce37f88 fix: enum type fixes in SDL (HBE-183) (#55)
* fix: added reqType typed in sdl

* fix: updateUserSession type
2023-03-28 17:46:41 +06:00

51 lines
1016 B
TypeScript

import { Field, ID, ObjectType } from '@nestjs/graphql';
import { ReqType } from 'src/types/RequestTypes';
@ObjectType()
export class UserRequest {
@Field(() => ID, {
description: 'ID of the user request',
})
id: string;
@Field(() => ID, {
description: 'ID of the parent collection ID',
})
collectionID: string;
@Field({
description: 'Title of the user request',
})
title: string;
@Field({
description: 'Content/Body of the user request',
})
request: string;
@Field(() => ReqType, {
description: 'Type (GRAPHQL/REST) of the user request',
})
type: ReqType;
@Field(() => Date, {
description: 'Date of the user request creation',
})
createdOn: Date;
}
@ObjectType()
export class UserRequestReorderData {
@Field({
description: 'User request being moved',
})
request: UserRequest;
@Field({
description:
'User request succeeding the request being moved in its new position',
nullable: true,
})
nextRequest?: UserRequest;
}