sendou.ink/prisma/queries/getAllSalmonRunRotations.ts
2020-12-16 11:24:52 +02:00

14 lines
427 B
TypeScript

import { Prisma } from "@prisma/client";
import prisma from "prisma/client";
export type GetAllSalmonRunRotationsData = Prisma.PromiseReturnType<
typeof getAllSalmonRunRotations
>;
export const getAllSalmonRunRotations = async () =>
prisma.salmonRunRotation.findMany({
where: { startTime: { lt: new Date() } },
orderBy: { id: "desc" },
select: { id: true, startTime: true, weapons: true, stage: true },
});