Created
December 12, 2019 13:02
-
-
Save scriptcoded/aff820c37339b3d9e7b9ec884cda48b3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
model Company { | |
id String @default(cuid()) @id | |
createdAt DateTime @default(now()) | |
updatedAt DateTime @updatedAt | |
workspaceId Int @unique | |
name String | |
users User[] | |
} | |
model User { | |
id String @default(cuid()) @id | |
createdAt DateTime @default(now()) | |
updatedAt DateTime @updatedAt | |
workspaceId Int @unique | |
givenName String? | |
familyName String? | |
email String | |
companies Company[] | |
} | |
model CompanyUsers { | |
id String @id | |
company Company | |
user User | |
roles String[] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@ifndefdeadmau5 It was a mistake and the wrong syntax. See the link below. The syntax here is the correct one :)
https://prisma.slack.com/archives/CKQTGR6T0/p1576156448333900?thread_ts=1576156170.333700&cid=CKQTGR6T0