Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/modules/simulado/dtos/questao-na-container.dto.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { ApiProperty } from '@nestjs/swagger';
import { QuestaoDTO } from './questao.dto.output';

export class QuestaoNaContainerDTO {
@ApiProperty({ type: QuestaoDTO })
public questao: QuestaoDTO;

@ApiProperty()
public numero: number;
}
12 changes: 9 additions & 3 deletions src/modules/simulado/dtos/questao.dto.output.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ export class QuestaoDTO {
@ApiProperty()
public materia: MateriaDTO;

@ApiProperty()
public numero: number;

@ApiProperty()
public textoQuestao: string;

Expand Down Expand Up @@ -80,4 +77,13 @@ export class QuestaoDTO {

@ApiProperty()
public reported: boolean;

@ApiProperty({
isArray: true,
example: [{ provaId: '...', provaNome: 'ENEM 2020 Dia 1', numero: 4 }],
})
public provasContendo: { provaId: string; provaNome: string; numero: number }[];

@ApiProperty({ required: false, nullable: true })
public provaBase?: string | null;
}
6 changes: 3 additions & 3 deletions src/modules/simulado/dtos/simulado.dto.output.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ApiProperty } from '@nestjs/swagger';
import { CategoriaDTO } from './categoria.dto.output';
import { QuestaoDTO } from './questao.dto.output';
import { QuestaoNaContainerDTO } from './questao-na-container.dto';

export class SimuladoDTO {
@ApiProperty()
Expand All @@ -15,8 +15,8 @@ export class SimuladoDTO {
@ApiProperty({ type: CategoriaDTO })
categoria: CategoriaDTO;

@ApiProperty({ type: QuestaoDTO, isArray: true })
questoes: QuestaoDTO[];
@ApiProperty({ type: QuestaoNaContainerDTO, isArray: true })
questoes: QuestaoNaContainerDTO[];

@ApiProperty()
aproveitamento?: number;
Expand Down
Loading