From ff37cca46430ed714015647469f88ce06781457a Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Sun, 29 Jun 2025 01:28:39 -0700 Subject: scaffold register,login,and auth endpoints --- backend/schema.prisma | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'backend/schema.prisma') 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 } -- cgit v1.2.3