Skip to content

Commit

Permalink
feat/#41/dto수정
Browse files Browse the repository at this point in the history
  • Loading branch information
JeonHeena committed Dec 12, 2024
1 parent 60f7201 commit 7ca6c8c
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions src/items/dto/item-changeStatus.dto.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsInt, Min } from 'class-validator';
import { IsArray, ArrayNotEmpty, IsInt, Min } from 'class-validator';

export class ItemChangeStatusDto {
@ApiProperty({
Expand All @@ -21,7 +21,14 @@ export class ItemChangeStatusDto {
itemId: number;
}

// export class EquipItemDto extends ItemChangeStatusDto {}
// export class UnequipItemDto extends ItemChangeStatusDto {}
// export class BuyItemDto extends ItemChangeStatusDto {}
// export class AddItemDto extends ItemChangeStatusDto {}
export class BuyItemDto extends ItemChangeStatusDto {
@ApiProperty({
description: '아이템 ID 배열',
example: [1, 2, 3],
})
@IsArray()
@ArrayNotEmpty() //비어있는 배열 안된다
@IsInt({ each: true })
@Min(1, { each: true })
itemIds: number[];
}

0 comments on commit 7ca6c8c

Please sign in to comment.