From 9d75cb07e45a7a5eea1551ec1810838a460545e3 Mon Sep 17 00:00:00 2001 From: NeilClack Date: Mon, 2 Feb 2026 22:05:57 -0600 Subject: [PATCH] Add the profile to the database. --- prisma/schema.prisma | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 070b5f1..2511b31 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -25,11 +25,33 @@ model User { role UserRole? @relation(fields: [roleId], references: [id]) sessions Session[] accounts Account[] + profile Profile? @@unique([email]) @@map("user") } +model Profile { + id String @id @default(uuid()) + userId String @unique + user User @relation(fields: [userId], references: [id], onDelete: Cascade) + firstName String + lastName String + phoneNumber String + addresses Address[] +} + +model Address { + id String @id @default(uuid()) + profileId String + profile Profile @relation(fields: [profileId], references: [id], onDelete: Cascade) + street String + city String + state String + postalCode String + country String +} + model Session { id String @id expiresAt DateTime