generated from nhcarrigan/template
feat: database
This commit is contained in:
21
prisma/schema.prisma
Normal file
21
prisma/schema.prisma
Normal file
@@ -0,0 +1,21 @@
|
||||
// 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 = "mongodb"
|
||||
url = env("MONGO_URI")
|
||||
}
|
||||
|
||||
model Links {
|
||||
id String @id @default(auto()) @map("_id") @db.ObjectId
|
||||
userId String
|
||||
url String
|
||||
slug String @unique
|
||||
|
||||
@@unique([userId, url], map: "userId_url")
|
||||
@@index(userId)
|
||||
}
|
||||
Reference in New Issue
Block a user