Initial commit: CMS completo com gerenciamento de leads e personalização de tema
This commit is contained in:
71
frontend/prisma/schema.prisma
Normal file
71
frontend/prisma/schema.prisma
Normal file
@@ -0,0 +1,71 @@
|
||||
// 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")
|
||||
}
|
||||
|
||||
// Modelo de Usuário (para o Painel Admin)
|
||||
model User {
|
||||
id String @id @default(cuid())
|
||||
email String @unique
|
||||
password String
|
||||
name String?
|
||||
avatar String?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
|
||||
// Modelo de Projeto
|
||||
model Project {
|
||||
id String @id @default(cuid())
|
||||
title String
|
||||
category String
|
||||
client String?
|
||||
status String @default("Em andamento") // "Em andamento", "Concluído"
|
||||
completionDate DateTime?
|
||||
description String? @db.Text
|
||||
coverImage String?
|
||||
galleryImages String[]
|
||||
featured Boolean @default(false)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
|
||||
// Modelo de Serviço
|
||||
model Service {
|
||||
id String @id @default(cuid())
|
||||
title String
|
||||
icon String
|
||||
shortDescription String?
|
||||
fullDescription String? @db.Text
|
||||
active Boolean @default(true)
|
||||
order Int @default(0)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
|
||||
// Modelo de Mensagem (Contato)
|
||||
model Message {
|
||||
id String @id @default(cuid())
|
||||
name String
|
||||
email String
|
||||
subject String
|
||||
message String @db.Text
|
||||
status String @default("Nova") // "Nova", "Lida", "Respondida"
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
|
||||
// Modelo de Conteúdo de Página (para textos editáveis)
|
||||
model PageContent {
|
||||
id String @id @default(cuid())
|
||||
slug String @unique // "home", "sobre", "contato"
|
||||
content Json
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
Reference in New Issue
Block a user