Skip to content

Instantly share code, notes, and snippets.

@Hachikoi-the-creator
Last active May 9, 2023 02:21
Show Gist options
  • Save Hachikoi-the-creator/9ccff455c775d13884015bd53538ab53 to your computer and use it in GitHub Desktop.
Save Hachikoi-the-creator/9ccff455c775d13884015bd53538ab53 to your computer and use it in GitHub Desktop.
model Owner {
id Int @id @default(autoincrement())
name String
dogs Dog[]
}
model Dog {
id Int @id @default(autoincrement())
name String
age Int @default(1)
ownerId Int
owner Owner @relation(fields: [ownerId], references: [id])
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment