19 lines
448 B
TypeScript
19 lines
448 B
TypeScript
import { ApiProperty, OmitType, PickType } from '@nestjs/swagger';
|
|
import { Group } from 'src/objects/group/group.entity';
|
|
import { User } from 'src/objects/user/user.entity';
|
|
|
|
export class PartialUser extends PickType(User, [
|
|
'sub',
|
|
'name',
|
|
'color',
|
|
'picture',
|
|
]) {}
|
|
|
|
export class GroupsResponseDto extends OmitType(Group, [
|
|
'members',
|
|
'buildings',
|
|
]) {
|
|
@ApiProperty({ type: PartialUser, isArray: true })
|
|
members: PartialUser[];
|
|
}
|