Bundles the 2026-07-12 code-audit session (Clusters A/B/C/D partial/E/F): denormalized Post/Advertisement reaction/comment/repost counters synced transactionally instead of live _count queries; real cursor-based pagination for followers/following/blocks lists; assertPetOwnership + formatRelativeTime centralized; dead r2.ts + AWS SDK deps removed; missing DB indexes added; account-deletion flow, mention notifications, pull-to-refresh feed, and mobile UI/i18n fixes from the surrounding sessions. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
23 lines
864 B
TypeScript
23 lines
864 B
TypeScript
import { MilestoneType } from "@prisma/client";
|
|
|
|
/**
|
|
* Hard-coded follower milestone thresholds and their corresponding MilestoneType enum values.
|
|
*
|
|
* Per D-09 and A3: these values are a constant map, not a DB table.
|
|
* Used by the follows router to detect when a follower count threshold is crossed
|
|
* and emit an auto-triggered milestone (D-10).
|
|
*/
|
|
export const FOLLOWER_MILESTONE_THRESHOLDS: Partial<Record<number, MilestoneType>> = {
|
|
500: MilestoneType.FOLLOWERS_500,
|
|
1000: MilestoneType.FOLLOWERS_1K,
|
|
2500: MilestoneType.FOLLOWERS_2_5K,
|
|
5000: MilestoneType.FOLLOWERS_5K,
|
|
10000: MilestoneType.FOLLOWERS_10K,
|
|
25000: MilestoneType.FOLLOWERS_25K,
|
|
50000: MilestoneType.FOLLOWERS_50K,
|
|
100000: MilestoneType.FOLLOWERS_100K,
|
|
250000: MilestoneType.FOLLOWERS_250K,
|
|
500000: MilestoneType.FOLLOWERS_500K,
|
|
1000000: MilestoneType.FOLLOWERS_1M,
|
|
};
|