feat(cardex): implement cardex controller, service, and DTO for stock movements
feat(pos): add POS controller and service for order creation and stock retrieval refactor(pos): enhance stock and product category retrieval with pagination and mapping
This commit is contained in:
@@ -11,6 +11,24 @@ async function main() {
|
||||
})
|
||||
}
|
||||
|
||||
if ((await prisma.user.count()) === 0) {
|
||||
const adminRole = await prisma.role.findUnique({ where: { name: 'Admin' } })
|
||||
if (!adminRole) {
|
||||
return
|
||||
}
|
||||
await prisma.user.upsert({
|
||||
where: { id: 1, firstName: 'عباس', lastName: 'حسنی' },
|
||||
update: {},
|
||||
create: {
|
||||
firstName: 'عباس',
|
||||
lastName: 'حسنی',
|
||||
roleId: adminRole.id,
|
||||
mobileNumber: '09120258156',
|
||||
password: '12345678',
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
if ((await prisma.inventory.count()) === 0) {
|
||||
await prisma.inventory.createMany({
|
||||
data: [
|
||||
|
||||
Reference in New Issue
Block a user