Dave Edelhart
09/12/2022, 10:49 PMenum EDU_TYPE {
COLLEGE
SKILL
}
model edu {
abbr String @id @db.Char(3)
type EDU_TYPE @default(SKILL)
name String
notes String
aspect String @db.Char(1)
edu edu? @relation(name: "parent_edu", fields: [parent], references: [abbr])
children edu[] @relation("parent_edu")
general Boolean @default(false)
parent String? @db.Char(3)
person_edu person_edu[]
}
I’m using nest and it has a pattern of a typescript def for the “data” value; what “type” of data should I use for the data I save to edu?
ex:
export class CreateEduDto {
abbr: string;
name: string;
notes: string;
aspect: string;
type: string; // <-- doesn't work
general: boolean;
}