158 lines
4.5 KiB
Plaintext
158 lines
4.5 KiB
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"
|
|
previewFeatures = ["multiSchema"]
|
|
}
|
|
|
|
datasource db {
|
|
provider = "postgresql"
|
|
url = env("DATABASE_URL")
|
|
schemas = ["cnt", "usr"]
|
|
}
|
|
|
|
model User {
|
|
id String @id @default(cuid())
|
|
email String @unique
|
|
username String @unique
|
|
password String
|
|
firstName String?
|
|
lastName String?
|
|
isActive Boolean @default(true)
|
|
role UserRole @default(USER)
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
|
|
// Relations
|
|
|
|
@@map("users")
|
|
@@schema("usr")
|
|
}
|
|
|
|
enum UserRole {
|
|
USER
|
|
ADMIN
|
|
HR
|
|
|
|
@@schema("usr")
|
|
|
|
}
|
|
|
|
model Blog {
|
|
id Int @id @default(autoincrement())
|
|
title String @map("title")
|
|
urlSlug String? @unique @map("url_slug") // optional canonical URL
|
|
content String @map("content") @db.Text
|
|
bannerImage String? @map("banner_image") // URL to banner image
|
|
category String? @map("category")
|
|
tags String[] @default([]) @map("tags")
|
|
metaTitle String? @map("meta_title")
|
|
metaDesc String? @map("meta_desc") @db.Text
|
|
publishedAt DateTime? @map("published_at")
|
|
createdAt DateTime @default(now()) @map("created_at")
|
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
deletedAt DateTime? @map("deleted_at")
|
|
|
|
@@map("blogs")
|
|
@@schema("cnt")
|
|
}
|
|
|
|
model FAQ {
|
|
id Int @id @default(autoincrement())
|
|
question String @map("question")
|
|
category String? @map("category")
|
|
answer String @map("answer")
|
|
tags String[] @default([]) @map("tags")
|
|
globalTag String[] @default([]) @map("global_tag")
|
|
createdAt DateTime @default(now()) @map("created_at")
|
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
deletedAt DateTime? @map("deleted_at")
|
|
|
|
@@map("faqs")
|
|
@@schema("cnt")
|
|
}
|
|
|
|
model Webcast {
|
|
id Int @id @default(autoincrement())
|
|
title String @map("title")
|
|
description String @map("description")
|
|
fileUrl String @map("file_url")
|
|
tags String[] @default([]) @map("tags")
|
|
createdAt DateTime @default(now()) @map("created_at")
|
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
deletedAt DateTime? @map("deleted_at")
|
|
|
|
@@map("webcasts")
|
|
@@schema("cnt")
|
|
}
|
|
|
|
model TrainingMaterials {
|
|
id Int @id @default(autoincrement())
|
|
title String @map("title")
|
|
description String @map("description")
|
|
fileUrl String @map("file_url")
|
|
tags String[] @default([]) @map("tags")
|
|
createdAt DateTime @default(now()) @map("created_at")
|
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
deletedAt DateTime? @map("deleted_at")
|
|
|
|
@@map("training_materials")
|
|
@@schema("cnt")
|
|
}
|
|
|
|
model ReadingMaterials {
|
|
id Int @id @default(autoincrement())
|
|
title String @map("title")
|
|
description String @map("description")
|
|
fileUrl String @map("file_url")
|
|
tags String[] @default([]) @map("tags")
|
|
createdAt DateTime @default(now()) @map("created_at")
|
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
deletedAt DateTime? @map("deleted_at")
|
|
|
|
@@map("reading_materials")
|
|
@@schema("cnt")
|
|
}
|
|
|
|
model Podcasts {
|
|
id Int @id @default(autoincrement())
|
|
title String @map("title")
|
|
description String @map("description")
|
|
fileUrl String @map("file_url")
|
|
tags String[] @default([]) @map("tags")
|
|
createdAt DateTime @default(now()) @map("created_at")
|
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
deletedAt DateTime? @map("deleted_at")
|
|
|
|
@@map("podcasts")
|
|
@@schema("cnt")
|
|
}
|
|
|
|
model CaseStudies {
|
|
id Int @id @default(autoincrement())
|
|
title String @map("title")
|
|
description String @map("description")
|
|
fileUrl String @map("file_url")
|
|
tags String[] @default([]) @map("tags")
|
|
createdAt DateTime @default(now()) @map("created_at")
|
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
deletedAt DateTime? @map("deleted_at")
|
|
|
|
@@map("case_studies")
|
|
@@schema("cnt")
|
|
}
|
|
|
|
model KlcArchive {
|
|
id Int @id @default(autoincrement())
|
|
title String @map("title")
|
|
description String @map("description")
|
|
fileUrl String @map("file_url")
|
|
tags String[] @default([]) @map("tags")
|
|
createdAt DateTime @default(now()) @map("created_at")
|
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
deletedAt DateTime? @map("deleted_at")
|
|
@@map("klc_archive")
|
|
@@schema("cnt")
|
|
}
|