// 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 User {
  id        Int      @id @default(autoincrement())
  username  String   @unique
  password  String
  role      String   @default("admin")
  createdAt DateTime @default(now())
  updatedAt DateTime @updatedAt
}

model SliderItem {
  id          Int      @id @default(autoincrement())
  title       String
  description String
  buttonText  String
  buttonLink  String
  active      Boolean  @default(true)
  order       Int      @default(0)
  createdAt   DateTime @default(now())
  updatedAt   DateTime @updatedAt
}

model News {
  id        Int      @id @default(autoincrement())
  title     String
  summary   String
  content   String
  image     String
  category  String
  author    String
  tags      String
  featured  Boolean  @default(false)
  date      String
  createdAt DateTime @default(now())
  updatedAt DateTime @updatedAt
}

model Media {
  id          Int      @id @default(autoincrement())
  type        String
  title       String
  description String
  thumbnail   String
  videoUrl    String?
  duration    String?
  category    String?
  featured    Boolean  @default(false)
  date        String
  createdAt   DateTime @default(now())
  updatedAt   DateTime @updatedAt
}

model Document {
  id          Int      @id @default(autoincrement())
  title       String
  description String
  type        String
  category    String
  size        String
  downloadUrl String
  date        String
  createdAt   DateTime @default(now())
  updatedAt   DateTime @updatedAt
}

model MetroStation {
  id          Int      @id @default(autoincrement())
  name        String
  status      String
  progress    Int      @default(0)
  description String?
  order       Int      @default(0)
  createdAt   DateTime @default(now())
  updatedAt   DateTime @updatedAt
}

model LiveStream {
  id        Int      @id @default(autoincrement())
  url       String
  title     String?
  active    Boolean  @default(false)
  createdAt DateTime @default(now())
  updatedAt DateTime @updatedAt
}

model Message {
  id        Int      @id @default(autoincrement())
  name      String
  email     String
  phone     String
  subject   String
  type      String
  message   String
  read      Boolean  @default(false)
  date      String
  createdAt DateTime @default(now())
  updatedAt DateTime @updatedAt
}

model FAQ {
  id        Int      @id @default(autoincrement())
  question  String
  answer    String
  order     Int      @default(0)
  createdAt DateTime @default(now())
  updatedAt DateTime @updatedAt
}

model Camera {
  id        Int      @id @default(autoincrement())
  name      String
  location  String
  videoUrl  String
  status    String   @default("online")
  viewers   Int      @default(0)
  order     Int      @default(0)
  createdAt DateTime @default(now())
  updatedAt DateTime @updatedAt
}

model SiteSettings {
  id        Int      @id @default(autoincrement())
  key       String   @unique
  value     String
  createdAt DateTime @default(now())
  updatedAt DateTime @updatedAt
}
