give twilio its own table

This commit is contained in:
Benjamin Palko 2025-01-18 23:22:15 -05:00
parent 3d562e4009
commit aeaafcefe1
5 changed files with 75 additions and 33 deletions

View file

@ -32,10 +32,11 @@ model User {
}
model Tenant {
id String @id @default(uuid())
clerkOrganizationId String @unique
users User[]
tenantConfig TenantConfig?
id String @id @default(uuid())
clerkOrganizationId String @unique
users User[]
tenantConfig TenantConfig?
name String
slug String @unique
@ -49,6 +50,17 @@ model TenantConfig {
tenant Tenant @relation(fields: [tenantId], references: [id])
tenantId String @unique
twilioConfig TwilioConfig?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model TwilioConfig {
id String @id @default(uuid())
tenantConfig TenantConfig @relation(fields: [tenantConfigId], references: [id])
tenantConfigId String @unique
accountSID String
authToken String
phoneNumber String