aboutsummaryrefslogtreecommitdiffstats
path: root/backend/schema.prisma
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2025-06-29 01:28:39 -0700
committerPinapelz <yukais@pinapelz.com>2025-06-29 01:28:39 -0700
commitff37cca46430ed714015647469f88ce06781457a (patch)
tree63f406a3c7fb463fed7f34efc8d04d58fe96e0cb /backend/schema.prisma
parente4fa1e69e7ebfb627c7198fd1a9881e9327ec4d4 (diff)
scaffold register,login,and auth endpoints
Diffstat (limited to 'backend/schema.prisma')
-rw-r--r--backend/schema.prisma17
1 files changed, 14 insertions, 3 deletions
diff --git a/backend/schema.prisma b/backend/schema.prisma
index ce84f61..3872cc4 100644
--- a/backend/schema.prisma
+++ b/backend/schema.prisma
@@ -8,7 +8,18 @@ datasource db {
}
model User {
- id Int @id @default(autoincrement())
- name String
- email String @unique
+ id Int @id @default(autoincrement())
+ username String @unique
+ password String
+ salt String
+ email String @unique
+ sessions Session[]
+}
+
+model Session {
+ id String @id @default(cuid())
+ userId Int
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
+ createdAt DateTime @default(now())
+ expiresAt DateTime
}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage