2021-03-22 13:48:48 +00:00
|
|
|
// This is your Prisma schema file,
|
|
|
|
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
|
|
|
|
|
|
|
datasource db {
|
|
|
|
provider = "postgresql"
|
|
|
|
url = env("DATABASE_URL")
|
|
|
|
}
|
|
|
|
|
|
|
|
generator client {
|
|
|
|
provider = "prisma-client-js"
|
|
|
|
}
|
|
|
|
|
|
|
|
model EventType {
|
|
|
|
id Int @default(autoincrement()) @id
|
|
|
|
title String
|
2021-04-28 12:24:16 +00:00
|
|
|
slug String
|
2021-03-22 13:48:48 +00:00
|
|
|
description String?
|
|
|
|
length Int
|
2021-04-28 09:23:30 +00:00
|
|
|
hidden Boolean @default(false)
|
2021-03-22 13:48:48 +00:00
|
|
|
user User? @relation(fields: [userId], references: [id])
|
|
|
|
userId Int?
|
|
|
|
}
|
|
|
|
|
|
|
|
model Credential {
|
|
|
|
id Int @default(autoincrement()) @id
|
|
|
|
type String
|
|
|
|
key Json
|
|
|
|
user User? @relation(fields: [userId], references: [id])
|
|
|
|
userId Int?
|
|
|
|
}
|
|
|
|
|
|
|
|
model User {
|
|
|
|
id Int @default(autoincrement()) @id
|
|
|
|
username String?
|
|
|
|
name String?
|
|
|
|
email String? @unique
|
2021-03-24 15:03:04 +00:00
|
|
|
password String?
|
2021-03-22 13:48:48 +00:00
|
|
|
bio String?
|
|
|
|
avatar String?
|
2021-04-16 02:09:22 +00:00
|
|
|
timeZone String @default("Europe/London")
|
2021-04-13 16:16:32 +00:00
|
|
|
startTime Int @default(0)
|
|
|
|
endTime Int @default(1440)
|
2021-03-22 13:48:48 +00:00
|
|
|
createdDate DateTime @default(now()) @map(name: "created")
|
|
|
|
eventTypes EventType[]
|
|
|
|
credentials Credential[]
|
|
|
|
@@map(name: "users")
|
|
|
|
}
|