这是我的 DTO
export class CreateGradeDto {
id: string;
first_bimester?: number;
second_bimester?: number;
third_bimester?: number;
fourth_bimester?: number;
studentId: never;
classId: string;
createdAt: Date;
updatedAt: Date;
}
Run Code Online (Sandbox Code Playgroud)
这是我的棱镜模型
model Grades {
id String @id @unique
first_bimester Float
second_bimester Float
third_bimester Float
fourth_bimester Float
student Student @relation(fields: [studentId], references: [id])
studentId String @unique
class Classes @relation(fields: [classId], references: [id])
classId String @unique
createdAt DateTime @default(now())
updatedAt DateTime @default(now())
}
Run Code Online (Sandbox Code Playgroud)
这是学生模型
export class CreateStudentDto {
id: string;
name: string;
cpf: string;
createdAt: Date; …Run Code Online (Sandbox Code Playgroud) 我收到这个错误
[Nest] 24356 - 10/03/2021, 11:19:31 AM LOG [NestFactory] Starting Nest application...
[Nest] 24356 - 10/03/2021, 11:19:31 AM LOG [InstanceLoader] PrismaModule dependencies initialized +51ms
[Nest] 24356 - 10/03/2021, 11:19:31 AM ERROR [ExceptionHandler] Nest can't resolve dependencies of the JwtService (?). Please make sure that the argument JWT_MODULE_OPTIONS at index [0] is available in the JwtService context.
Potential solutions:
- If JWT_MODULE_OPTIONS is a provider, is it part of the current JwtService?
- If JWT_MODULE_OPTIONS is exported from a separate @Module, …Run Code Online (Sandbox Code Playgroud)