import { prisma } from "@/lib/prisma";

export const getStudents = async () => {
  return prisma.students.findMany({
    orderBy: {
      id: "desc",
    },
  });
};

export const getStudentById = async (
  id: number
) => {
  return prisma.students.findUnique({
    where: {
      id,
    },
  });
};