generator client {
  provider = "prisma-client-js"
}

datasource db {
  provider  = "postgresql"
  url       = env("POSTGRES_PRISMA_URL") // uses connection pooling
  directUrl = env("POSTGRES_URL_NON_POOLING") // uses a direct connection
}

model User {
  id        String   @id @default(cuid())
  email     String   @unique
  code      String   @unique
  confirmed Boolean  @default(false)
  deleted   Boolean  @default(false)
  createdAt DateTime @default(now()) @map(name: "created_at")

  @@map(name: "users")
}

model News {
  id        Float    @id @unique
  title     String
  text      String?
  type      String
  by        String
  time      Float
  url       String?
  score     Float
  createdAt DateTime @default(now()) @map(name: "created_at")

  @@map(name: "news")
}
