From cb645e43a967d19ae1d334a2d5d1afdda2342bc3 Mon Sep 17 00:00:00 2001 From: Benjamin Palko Date: Wed, 15 Jan 2025 14:43:30 -0500 Subject: [PATCH] update schema definitions after Mostaphas Tenant impl --- prisma/schema.prisma | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index e8b23a7..1c40c21 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -32,18 +32,27 @@ model User { } model Tenant { - id String @id @default(uuid()) - name String - slug String @unique - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - clerkOrganizationId String @unique + id String @id @default(uuid()) + clerkOrganizationId String @unique users User[] + tenantConfig TenantConfig? + + name String + slug String @unique + + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt } model TenantConfig { - tenantId String @id + id String @id @default(uuid()) + tenant Tenant @relation(fields: [tenantId], references: [id]) + tenantId String @unique + accountSID String authToken String phoneNumber String -} + + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt +} \ No newline at end of file