44 lines
952 B
Plaintext
44 lines
952 B
Plaintext
// This is your Prisma schema file,
|
|
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
|
|
|
generator client {
|
|
provider = "prisma-client-js"
|
|
}
|
|
|
|
datasource db {
|
|
provider = "postgresql"
|
|
url = env("DATABASE_URL")
|
|
}
|
|
|
|
|
|
model Car {
|
|
id Int @id @default(autoincrement())
|
|
name String
|
|
numberOfSeats Int
|
|
miles Int
|
|
price Int
|
|
image String
|
|
features String[]
|
|
description String
|
|
city String
|
|
model String
|
|
make String
|
|
listerId String
|
|
messages Message[]
|
|
}
|
|
|
|
|
|
model Message {
|
|
id Int @id @default(autoincrement())
|
|
name String
|
|
email String
|
|
phone String
|
|
message String
|
|
listingId Int
|
|
listing Car @relation(fields: [listingId], references: [id], onDelete: Cascade)
|
|
}
|
|
|
|
// model Listing {
|
|
// id Int @id @default(autoincrement())
|
|
|
|
// } |