aboutsummaryrefslogtreecommitdiffstats
path: root/app/prisma/schema.prisma
diff options
context:
space:
mode:
Diffstat (limited to 'app/prisma/schema.prisma')
-rw-r--r--app/prisma/schema.prisma53
1 files changed, 0 insertions, 53 deletions
diff --git a/app/prisma/schema.prisma b/app/prisma/schema.prisma
deleted file mode 100644
index 9dde5b5..0000000
--- a/app/prisma/schema.prisma
+++ /dev/null
@@ -1,53 +0,0 @@
-// This is your Prisma schema file,
-// learn more about it in the docs: https://pris.ly/d/prisma-schema
-
-// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?
-// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init
-
-generator client {
- provider = "prisma-client-js"
- output = "../src/generated/prisma"
-}
-
-datasource db {
- provider = "postgresql"
- url = env("DATABASE_URL")
-}
-
-model User {
- id String @id @default(uuid())
- email String @unique
- name String?
- password String
- createdAt DateTime @default(now())
- updatedAt DateTime @updatedAt
- locations Location[]
- locationShares LocationShare[] @relation("Sender")
- locationReceived LocationShare[] @relation("Receiver")
-}
-
-model Location {
- id String @id @default(uuid())
- userId String
- user User @relation(fields: [userId], references: [id], onDelete: Cascade)
- latitude Float
- longitude Float
- accuracy Float?
- timestamp DateTime @default(now())
- shares LocationShare[]
-}
-
-model LocationShare {
- id String @id @default(uuid())
- senderId String
- sender User @relation("Sender", fields: [senderId], references: [id], onDelete: Cascade)
- receiverId String?
- receiver User? @relation("Receiver", fields: [receiverId], references: [id], onDelete: SetNull)
- locationId String
- location Location @relation(fields: [locationId], references: [id], onDelete: Cascade)
- token String @unique
- expiryAt DateTime?
- createdAt DateTime @default(now())
- emailSent Boolean @default(false)
- accessCount Int @default(0)
-}