【发布时间】:2021-08-23 05:42:33
【问题描述】:
我是 NestJS 的初学者,我想为下面的结构写一个 DTO -
{
something: {
info: {
title: string,
score: number,
description: string,
time: string,
DateOfCreation: string
},
Store: {
item: {
question: string,
options: {
item: {
answer: string,
description: string,
id: string,
key: string,
option: string
}
}
}
}
}
}
我想为那个嵌套的 Data 对象写一个 DTO。我找不到在 NestJS 中编写嵌套 DTO 的可靠示例。我是 NestJS 的初学者,以前从未使用过 DTO。所以请不要以为我知道些什么。我将它与 Mongoose 一起使用。
【问题讨论】:
标签: javascript typescript nestjs dto