Files
hoppscotch/packages/hoppscotch-backend/src/user-request/user-request.model.ts
Mir Arif Hasan 8550c92e37 feat: subscription return response updated for moveUserRequest (#39)
* feat: subscription return response updated for moveUserRequest

* feat: update test cases
2023-03-13 16:15:51 +05:30

51 lines
1.0 KiB
TypeScript

import { Field, ID, ObjectType } from '@nestjs/graphql';
import { ReqType } from 'src/user-history/user-history.model';
@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;
}