Open YangIsCoding opened 4 months ago
complete database but instead of using mongo, it's completed with prisma
using 5 hrs
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?
// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "mysql"
url = env("DATABASE_URL")
relationMode = "prisma"
}
model ContactForm {
id Int @id @default(autoincrement())
name String
email String
phoneNumber String?
message String
createdAt DateTime @default(now())
}
model post {
id Int @id @unique @default(autoincrement())
userId Int
title String
content String
shortdesc String
postTime String
postImg String
user user @relation(fields: [userId], references: [userId])
}
model user {
userId Int @id @unique @default(autoincrement())
userName String
userImg String
posts post[]
}
create mongo db of the website