feat(backend): expose POST /api/emprunts with departure checklist

This commit is contained in:
SaidSoighiri94
2026-07-06 09:46:03 +02:00
parent d8f044924e
commit 3215a3c11f
9 changed files with 267 additions and 11 deletions
@@ -1,4 +1,4 @@
import { Prisma } from '@prisma/client';
import { Materiel, Prisma } from '@prisma/client';
import { prisma } from '../db/prisma';
export type MaterielAvecCategorie = Prisma.MaterielGetPayload<{ include: { categorie: true } }>;
@@ -35,3 +35,7 @@ export function findDisponiblesParCampus(
orderBy: { nom: 'asc' },
});
}
export function findById(id: number): Promise<Materiel | null> {
return prisma.materiel.findUnique({ where: { id } });
}