41 create tenant twilio config #62

Merged
BenjaminPalko merged 20 commits from 41-create-tenant-twilio-config into master 2025-01-26 23:36:06 -05:00
Showing only changes of commit cb645e43a9 - Show all commits

View file

@ -32,18 +32,27 @@ model User {
} }
model Tenant { model Tenant {
id String @id @default(uuid()) id String @id @default(uuid())
name String clerkOrganizationId String @unique
slug String @unique
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
clerkOrganizationId String @unique
users User[] users User[]
tenantConfig TenantConfig?
name String
slug String @unique
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
} }
model TenantConfig { model TenantConfig {
tenantId String @id id String @id @default(uuid())
tenant Tenant @relation(fields: [tenantId], references: [id])
tenantId String @unique
accountSID String accountSID String
authToken String authToken String
phoneNumber String phoneNumber String
piopi commented 2025-01-17 11:52:58 -05:00 (Migrated from github.com)
Review

Not a fan of calling this TenantConfig while it contains twillio specific fields, if you have a new integration like sendgrid, will you just add a new column here? It doesn't feel scalable, I think you could either rename this to TwillioTenantConfig, if you don't wanna deal with it now or have a generic way to store integration credentials. Like have two column, integrationName, integrationValues (JSON column)

Not a fan of calling this TenantConfig while it contains twillio specific fields, if you have a new integration like sendgrid, will you just add a new column here? It doesn't feel scalable, I think you could either rename this to TwillioTenantConfig, if you don't wanna deal with it now or have a generic way to store integration credentials. Like have two column, integrationName, integrationValues (JSON column)
piopi commented 2025-01-17 11:53:52 -05:00 (Migrated from github.com)
Review

and use Zod for validation

and use Zod for validation
}
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}