This commit is contained in:
2026-05-07 23:18:34 +02:00
commit 07c58f23ab
39 changed files with 6044 additions and 0 deletions

View File

@@ -0,0 +1,53 @@
// 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 = "postgresql"
url = env("DATABASE_URL")
}
model User {
id Int @id @default(autoincrement())
username String @unique
email String @unique
password String
type String
createdAt DateTime @default(now())
ofertas Oferta[]
postulaciones UserOferta[]
}
model UserOferta {
id Int @id @default(autoincrement())
userId Int
ofertaId Int
createdAt DateTime @default(now())
user User @relation(fields: [userId], references: [id])
oferta Oferta @relation(fields: [ofertaId], references: [id])
@@unique([userId, ofertaId])
}
model Oferta {
id Int @id @default(autoincrement())
titulo String
empresa String
ubicacion String
salario String @default("0")
contrato String
descripcion String
url String
authorId Int
author User @relation(fields: [authorId], references: [id])
candidatos UserOferta[]
}