| 1 | // This is your Prisma schema file, |
| 2 | // learn more about it in the docs: https://pris.ly/d/prisma-schema |
| 3 | |
| 4 | // Looking for ways to speed up your queries, or scale easily with your serverless or edge functions? |
| 5 | // Try Prisma Accelerate: https://pris.ly/cli/accelerate-init |
| 6 | |
| 7 | generator client { |
| 8 | provider = "prisma-client-js" |
| 9 | } |
| 10 | |
| 11 | datasource db { |
| 12 | provider = "postgresql" |
| 13 | url = env("DATABASE_URL") |
| 14 | } |
| 15 | |
| 16 | model UserProfile { |
| 17 | id String @id @default(uuid()) |
| 18 | userId String @unique @map("user_id") // References user from auth service |
| 19 | firstName String? @map("first_name") |
| 20 | lastName String? @map("last_name") |
| 21 | bio String? |
| 22 | avatarUrl String? @map("avatar_url") |
| 23 | preferences Json? @default("{}") // Store user preferences as JSON |
| 24 | createdAt DateTime @default(now()) @map("created_at") |
| 25 | updatedAt DateTime @updatedAt @map("updated_at") |
| 26 | |
| 27 | @@map("user_profiles") |
| 28 | } |