import { prisma } from "@/lib/db";
import type { TimelineEvent } from "@prisma/client";

export async function getAllTimelineEvents(): Promise<TimelineEvent[]> {
  return prisma.timelineEvent.findMany({
    orderBy: [{ sortOrder: "asc" }, { date: "desc" }],
  });
}
