This is my 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;
}
This is my prisma model
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())
}
And this is the student model
export class CreateStudentDto {
id: string;
name: string;
cpf: string;
createdAt: Date;
updatedAt: Date;
}
(I'm using nestjs for this project)
i can't figure out why i can't save the grades, even knowing that all the time the id's are saved as string. I also checked the real postgre database and they are saved as strings.
Can someone help me??