stuff done

This commit is contained in:
2025-03-11 02:54:09 +02:00
parent 58e7ed2f06
commit 516b45fad9
90 changed files with 2950 additions and 9458 deletions

24
actions/admin/order.tsx Normal file
View File

@@ -0,0 +1,24 @@
import {db} from '@/lib/db/prisma/client'
export const getAllOrders = async () => {
return db.order.findMany({
orderBy: [
{
createdAt: 'desc'
}
]
})
}
export const getOrdersByUserId = async (userId: number) => {
return db.order.findMany({
where: {
userId
},
orderBy: [
{
createdAt: 'desc'
}
]
})
}