snapkitty
developer-tools
kotlin
SNAPKITTYWEST's picture
push from SNAPKITTYWEST/myapplication
7d8aa82 verified
Raw History Blame Contribute Delete
1.52 kB
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```'
}
}