nest.js

· Backend
이번 시간에는 Nest.js의 DTO(Data transfer object)로부터 MongoDB 의존성을 없앴던 방법을 공유하려 합니다. 이 포스팅을 읽고 난 후에는 다음의 내용을 얻어가실 수 있습니다. DTO로부터 특정 DB의 의존성을 제거하기 Model User, Report model들을 코드로 확인해보죠. user.entity.ts @Schema() export class User { id: string; @Prop({ select: false, }) __v?: number; @ApiProperty() @Prop() email: string; @Prop({}) password: string; @Prop({ default: true, }) isAdmin: boolean; } report.entity..
mechaniccoder
'nest.js' 태그의 글 목록