Created
September 6, 2021 23:38
-
-
Save MohammedALREAI/4638298d9ec29625bd148421277fa35d to your computer and use it in GitHub Desktop.
house prisma
This file contains hidden or 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
// This is your Prisma schema file, | |
// learn more about it in the docs: https://pris.ly/d/prisma-schema | |
datasource db { | |
provider = "postgresql" | |
url = env("PG_CONNECTIONSTRING") | |
} | |
generator client { | |
provider = "prisma-client-js" | |
} | |
model House { | |
id String @id @default(cuid()) | |
images String | |
latitude Float | |
longitude Float | |
address String | |
bedrooms Int | |
createdAt DateTime @default(now()) | |
updatedAt DateTime @default(now()) | |
reviewHouses Review[] | |
} | |
enum StatusOrderHouse { | |
Active | |
Deleted | |
Inactive | |
} | |
model Order { | |
id String @id @default(cuid()) | |
welletUser String | |
status StatusOrderHouse | |
createdAt DateTime @default(now()) | |
updatedAt DateTime @default(now()) | |
} | |
model Review { | |
id String @id @default(cuid()) | |
title String | |
userName String | |
house House @relation(fields: [houseId], references: [id]) | |
houseId String | |
updatedAt DateTime @default(now()) @updatedAt | |
createdAt DateTime @default(now()) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment