-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #78 from Together42/rotation-dto
change: change partial entities to specific dtos
- Loading branch information
Showing
5 changed files
with
157 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import { ApiProperty } from '@nestjs/swagger'; | ||
import { IsInt, IsDate, IsOptional } from 'class-validator'; | ||
|
||
export class FindAllRotationDto { | ||
@ApiProperty({ | ||
example: 1, | ||
description: '사용자 ID', | ||
}) | ||
@IsInt() | ||
userId: number; | ||
|
||
@ApiProperty({ | ||
example: 1, | ||
description: '정보를 업데이트한 유저의 ID', | ||
}) | ||
@IsInt() | ||
updateUserId: number; | ||
|
||
@ApiProperty({ | ||
example: 2021, | ||
description: '사서 일정의 연도', | ||
}) | ||
@IsInt() | ||
year: number; | ||
|
||
@ApiProperty({ | ||
example: 1, | ||
description: '사서 일정의 월', | ||
}) | ||
@IsInt() | ||
month: number; | ||
|
||
@ApiProperty({ | ||
example: 1, | ||
description: '사서 일정의 일', | ||
}) | ||
@IsInt() | ||
day: number; | ||
|
||
@ApiProperty({ | ||
example: 1, | ||
description: '사서 일정의 생성 시간', | ||
}) | ||
@IsDate() | ||
createdAt: Date; | ||
|
||
@ApiProperty({ | ||
example: 1, | ||
description: '사서 일정의 업데이트 시간', | ||
}) | ||
@IsOptional() | ||
@IsDate() | ||
updatedAt: Date; | ||
|
||
@ApiProperty({ | ||
example: 1, | ||
description: '사서 일정의 삭제 시간', | ||
}) | ||
@IsOptional() | ||
@IsDate() | ||
deletedAt: Date; | ||
|
||
@ApiProperty({ | ||
example: 1, | ||
description: '해당 사서 일정에 참여하는 사서의 닉네임', | ||
}) | ||
intraId: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { ApiProperty } from '@nestjs/swagger'; | ||
import { IsNotEmpty, IsNumber } from 'class-validator'; | ||
|
||
export class FindRegistrationDto { | ||
@ApiProperty({ | ||
example: 2024, | ||
description: '유저 본인의 다음 달 로테이션 날짜의 연도', | ||
}) | ||
@IsNotEmpty() | ||
@IsNumber() | ||
year: number; | ||
|
||
@ApiProperty({ | ||
example: 1, | ||
description: '유저 본인의 다음 달 로테이션 날짜의 달', | ||
}) | ||
@IsNotEmpty() | ||
@IsNumber() | ||
month: number; | ||
|
||
@ApiProperty({ | ||
example: 1, | ||
description: '유저 본인이 선택한 다음 달 로테이션 불가능 일자', | ||
}) | ||
@IsNotEmpty() | ||
attendLimit: JSON; | ||
|
||
@ApiProperty({ | ||
example: 1, | ||
description: '유저 본인의 인트라 ID(닉네임)', | ||
}) | ||
@IsNotEmpty() | ||
intraId: string; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { ApiProperty } from '@nestjs/swagger'; | ||
import { IsNotEmpty } from 'class-validator'; | ||
|
||
export class FindTodayRotationDto { | ||
@ApiProperty({ | ||
example: 1, | ||
description: '오늘 사서 업무를 맡은 사서의 닉네임입니다.', | ||
}) | ||
@IsNotEmpty() | ||
nickname: string; | ||
|
||
@ApiProperty({ | ||
example: 2024, | ||
description: '오늘 사서 업무를 맡은 사서의 슬랙 ID입니다.', | ||
}) | ||
slackMemberId: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters