-
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 branch 'develop' into feature/#93/today-department
- Loading branch information
Showing
26 changed files
with
442 additions
and
138 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
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
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
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,74 @@ | ||
import { | ||
IsInt, | ||
IsOptional, | ||
IsString, | ||
Length, | ||
MaxLength, | ||
Min, | ||
} from 'class-validator'; | ||
import { ApiProperty } from '@nestjs/swagger'; | ||
import { CreateKMMedicineDto } from './create-km-medicine.dto'; | ||
import { PartialType } from '@nestjs/mapped-types'; | ||
|
||
export class UpdateKMMedicineDto extends PartialType(CreateKMMedicineDto) { | ||
@ApiProperty({ | ||
description: '약품명', | ||
example: '수정한 갈근탕연조엑스(단미엑스혼합제) S02', | ||
}) | ||
@IsString() | ||
@Length(2, 40) | ||
name: string; | ||
|
||
@ApiProperty({ | ||
description: '적응증', | ||
example: | ||
'감기, 몸살, 뒷목과 등이 뻣뻣하게 아픔, 머리와 얼굴이 아픈 증상, 갈증, 설사, 피부 발진, 비염, 부비동염, 급성 기관지염, 급성 후두염, 성홍열, 대장염', | ||
required: false, | ||
}) | ||
@IsString() | ||
@MaxLength(1000) | ||
indication: string; | ||
|
||
@ApiProperty({ | ||
description: '사무실 재고', | ||
example: 5, | ||
required: false, | ||
}) | ||
@IsInt() | ||
@Min(0) | ||
stationQuantity: number; | ||
|
||
@ApiProperty({ | ||
description: '서울역 재고', | ||
example: 20, | ||
}) | ||
@IsInt() | ||
@Min(0) | ||
officeQuantity: number; | ||
|
||
@ApiProperty({ | ||
description: '포장단위', | ||
example: 10, | ||
}) | ||
@IsInt() | ||
@Min(0) | ||
packaging: number; | ||
|
||
@ApiProperty({ | ||
description: '총량', | ||
example: 200, | ||
}) | ||
@IsInt() | ||
@Min(0) | ||
totalAmount: number; | ||
|
||
@ApiProperty({ | ||
description: | ||
"사진 - <em>image 속성 없으면 사진 변경 안 함, image='' 빈 값으로 보내면 사진 삭제</em>", | ||
type: 'string', | ||
format: 'binary', | ||
required: false, | ||
}) | ||
@IsOptional() | ||
image?: any; | ||
} |
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
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
55 changes: 55 additions & 0 deletions
55
backend/src/km-prescriptions/dto/create-km-prescription.dto.ts
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,55 @@ | ||
import { PickType } from '@nestjs/mapped-types'; | ||
import { KM_Prescriptions } from '../entity/km-prescriptions.entity'; | ||
import { IsInt, IsNumber, IsOptional, IsString } from 'class-validator'; | ||
import { ApiProperty } from '@nestjs/swagger'; | ||
|
||
export class CreateKMPrescriptionDto extends PickType(KM_Prescriptions, [ | ||
'doses', | ||
'dosesCountByDay', | ||
'dosesDay', | ||
'dosesTime', | ||
'memo', | ||
]) { | ||
@ApiProperty({ | ||
description: '1회 투약량', | ||
example: 1, | ||
}) | ||
@IsNumber() | ||
doses: number; | ||
|
||
@ApiProperty({ | ||
description: '1일 복용횟수', | ||
example: 'tid', | ||
}) | ||
@IsString() | ||
dosesCountByDay: string; | ||
|
||
@ApiProperty({ | ||
description: '복용 일수', | ||
example: 5, | ||
}) | ||
@IsInt() | ||
dosesDay: number; | ||
|
||
@ApiProperty({ | ||
description: '복용 시간', | ||
example: '식전', | ||
}) | ||
@IsString() | ||
dosesTime: string; | ||
|
||
@ApiProperty({ | ||
description: '메모', | ||
example: '', | ||
}) | ||
@IsString() | ||
@IsOptional() | ||
memo: string; | ||
|
||
@ApiProperty({ | ||
description: '약품 ID', | ||
example: 1, | ||
}) | ||
@IsNumber() | ||
medicineId: number; | ||
} |
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
Oops, something went wrong.