generator client {
  provider = "prisma-client"
  output   = "../src/generated/prisma"
}

datasource db {
  provider = "postgresql"
}

model tokens {
  id        String    @id
  token     String    @unique
  type      TokenType
  userId    String
  expiresAt DateTime
  createdAt DateTime  @default(now())
  users     users     @relation(fields: [userId], references: [id], onDelete: Cascade)
}

model users {
  id        String   @id
  name      String
  email     String   @unique
  password  String
  createdAt DateTime @default(now())
  updatedAt DateTime
  tokens    tokens[]
}

enum TokenType {
  REFRESH
}
