File size: 1,519 Bytes
7d8aa82 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | import { prisma } from '../lib/prisma'
export async function handleTier(): Promise<string> {
try {
const dealCount = await prisma.deal.count()
const vendorCount = await prisma.vendor.count({ where: { status: 'active' } })
const poCount = await prisma.purchaseOrder.count()
const poolCount = await prisma.moneyPool.count({ where: { status: 'active' } })
return `**Fundability Tier Status**
\`\`\`
Tier 0 β Foundation β in progress
Entity formation β not confirmed
EIN registered β not confirmed
Business bank account β not confirmed
Tier 1 β Fundability β pending Tier 0
Google Business Profile β
411 directory listing β
Website + domain email β
DUNS number β
Tier 2 β Tradelines β pending Tier 1
Net-30 accounts (need 3) β
Bureau reporting (need 2) β
Paydex β₯ 80 β
Tier 3 β Revolving Lines β pending Tier 2
Revolving accounts (need 2) β
Utilization < 30% β
12+ months in business β
Tier 4 β Vendor Expansion β pending Tier 3
Active vendors: ${vendorCount}/5
Open POs: ${poCount}
Active pools: ${poolCount}
Open deals: ${dealCount}
Next step: /ask agent:bridge message:walk me through Tier 0
\`\`\``
} catch {
return '**Tier Status**\n```\nDatabase unreachable β use War Room for live status\n```'
}
}
|