30 lines
716 B
Plaintext
30 lines
716 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 = "sqlite"
|
|
url = env("DATABASE_URL")
|
|
}
|
|
|
|
model File {
|
|
id Int @id @default(autoincrement())
|
|
filename String @unique
|
|
originalName String
|
|
fileType String // 'image' or 'video'
|
|
fileSize Int
|
|
filePath String
|
|
mimeType String
|
|
isVisible Boolean @default(true)
|
|
isDeleted Boolean @default(false)
|
|
uploadedAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
|
|
@@map("files")
|
|
@@index([fileType])
|
|
@@index([isVisible])
|
|
@@index([uploadedAt])
|
|
} |