Skip to content

Commit 723402b

Browse files
committed
Tweak DTO
1 parent baefb98 commit 723402b

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/components/notifications/dto/notification.dto.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Field, InterfaceType } from '@nestjs/graphql';
22
import { DateTime } from 'luxon';
33
import { keys as keysOf } from 'ts-transformer-keys';
44
import { DateTimeField, Resource, SecuredProps } from '~/common';
5-
import { LinkTo, RegisterResource } from '~/core/resources';
5+
import { RegisterResource } from '~/core/resources';
66

77
@RegisterResource()
88
@InterfaceType({
@@ -12,12 +12,15 @@ export class Notification extends Resource {
1212
static readonly Props: string[] = keysOf<Notification>();
1313
static readonly SecuredProps: string[] = keysOf<SecuredProps<Notification>>();
1414

15-
readonly for: LinkTo<'User'>;
16-
17-
@Field(() => Boolean)
15+
@Field(() => Boolean, {
16+
description: 'Whether the notification is unread for the requesting user',
17+
})
1818
readonly unread: boolean;
1919

20-
@DateTimeField({ nullable: true })
20+
@DateTimeField({
21+
nullable: true,
22+
description: 'When the notification was read for the requesting user',
23+
})
2124
readonly readAt: DateTime | null;
2225
}
2326

0 commit comments

Comments
 (0)