Skip to content

Commit d8fb59c

Browse files
add id in fragments part dto
1 parent f6f016d commit d8fb59c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

service/src/tickets/thread/_dto/parts/fragment.part.dto.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1-
import { IsEnum, IsOptional, IsString, ValidateNested } from 'class-validator'
1+
import { IsEnum, IsOptional, IsString, ValidateNested, IsMongoId } from 'class-validator'
22
import { Type } from 'class-transformer'
33
import { IdfsPartDto } from '~/_common/dto/parts/idfs.part.dto'
44
import { ApiProperty } from '@nestjs/swagger'
55
import { FragmentType, FragmentTypeList } from '~/tickets/thread/_enum/fragment-type.enum'
6+
import { Types } from 'mongoose'
67

78
export class FragmentPartDto {
9+
@IsMongoId()
10+
@ApiProperty()
11+
public id: Types.ObjectId
12+
813
@IsEnum(FragmentTypeList)
914
@ApiProperty({ enum: FragmentTypeList })
1015
public disposition: FragmentType

0 commit comments

Comments
 (0)