인프런 커뮤니티 질문&답변
PickType, OmitType은 swagger 제공 메서드를 꼭 사용해야하나요 ?
작성
·
412
답변 1
1

고명우
질문자
찾아보니 이런게 있는데 잘 사용했는지 모르겠네요 
cats.request.dto.ts ------------------------------------------------
import { Cat } from '../cats.entity';
export type CatRequestDto = Pick<Cat, 'email' | 'name' | 'password'>;
cats.dto.ts ------------------------------------------------
cats.dto.ts ------------------------------------------------
import { Cat } from '../cats.entity';
export type ReadOnlyCatDto = Omit<Cat, 'password' >;
// mongo 아니고 mysql을 사용해서 entity에 id가 정의되어 있습니다.
// mongo 아니고 mysql을 사용해서 entity에 id가 정의되어 있습니다.






.png?w=112)