generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "mysql"
url = env("DATABASE_URL")
}
enum Sex {
suspected_male
suspected_female
male
female
intersex
unknown
}
model Animal {
id Int @id @default(autoincrement())
species String @db.VarChar(255)
spcies_scientific_name String @db.VarChar(255)
age String @db.VarChar(255)
dob DateTime?
sex Sex
mother Animal? @relation(name: "Mother", fields: [motherId], references: [id])
motherId Int? // relation scalar field (used in the `@relation` attribute above)
father Animal? @relation(name: "Father", fields: [fatherId], references: [id])
fatherId Int? // relation scalar field (used in the `@relation` attribute above)
}
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "mysql"
url = env("DATABASE_URL")
}
enum Sex {
suspected_male
suspected_female
male
female
intersex
unknown
}
model Animal {
id Int @id @default(autoincrement())
species String @db.VarChar(255)
spcies_scientific_name String @db.VarChar(255)
age String @db.VarChar(255)
dob DateTime?
sex Sex
mother Animal? @relation(name: "Mother", fields: [motherId], references: [id])
motherId Int? // relation scalar field (used in the `@relation` attribute above)
father Animal? @relation(name: "Father", fields: [fatherId], references: [id])
fatherId Int? // relation scalar field (used in the `@relation` attribute above)
}