use camelcase file names from now on...

This commit is contained in:
2024-08-21 20:55:58 +02:00
parent acc9eaae9e
commit 6b97e7d9cb
55 changed files with 396 additions and 116 deletions

View File

@ -0,0 +1,16 @@
import prisma from '../utilities/prisma' // Import the global Prisma instance
import { Object } from '@prisma/client'
class ObjectRepository {
async getById(id: string): Promise<Object | null> {
return prisma.object.findUnique({
where: { id }
})
}
async getAll(): Promise<Object[]> {
return prisma.object.findMany()
}
}
export default new ObjectRepository()