Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- generator client {
- provider = "prisma-client-js"
- }
- datasource db {
- provider = "mysql"
- url = env("DATABASE_URL")
- }
- model USER {
- id String @id @DEFAULT(uuid())
- firstName String
- lastName String
- createdAt DateTime @DEFAULT(now())
- updatedAt DateTime @updatedAt
- HouseOwned House[] @relation("HouseOwner")
- HouseBuilt House[] @relation("HouseBuilder")
- }
- model House {
- id String @id @DEFAULT(uuid())
- address String @UNIQUE
- wifiPassword String?
- Owner USER @relation("HouseOwner", FIELDS: [OwnerId], REFERENCES: [id])
- OwnerId String
- Builder USER @relation("HouseBuilder", FIELDS: [BuilderId], REFERENCES: [id])
- BuilderId String
- createdAt DateTime @DEFAULT(now())
- updatedAt DateTime @updatedAt
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement