diff --git a/apps/dashboard/auth.config.ts b/apps/dashboard/auth.config.ts index 8d15faf..579a642 100644 --- a/apps/dashboard/auth.config.ts +++ b/apps/dashboard/auth.config.ts @@ -41,7 +41,34 @@ export default betterAuth({ admin({ defaultRole: 'user' }), twoFactor(), passkey(), - organization({ ac, roles: organizationRoles }), + organization({ + ac, + roles: organizationRoles, + schema: { + organization: { + additionalFields: { + billingExempt: { + type: 'boolean', + input: false, + required: true, + defaultValue: false + }, + disabled: { + type: 'boolean', + input: false, + required: true, + defaultValue: false + }, + deletedAt: { + type: 'number', + bigint: true, + input: false, + required: false + } + } + } + } + }), autumn({ customerScope: 'organization' }) ] }); diff --git a/apps/dashboard/src/lib/server/db/auth.schema.ts b/apps/dashboard/src/lib/server/db/auth.schema.ts index 9d710a0..63a16c7 100644 --- a/apps/dashboard/src/lib/server/db/auth.schema.ts +++ b/apps/dashboard/src/lib/server/db/auth.schema.ts @@ -2,9 +2,9 @@ import { relations } from 'drizzle-orm'; import { pgTable, text, + bigint, timestamp, boolean, - bigint, integer, index, uniqueIndex