feat: add product variant management functionality
- Implemented CreateProductVariantDto and UpdateProductVariantDto for product variant data transfer. - Developed ProductVariantsController to handle CRUD operations for product variants. - Created ProductVariantsService to interact with the database using Prisma. - Added ProductVariantsModule to encapsulate the product variant feature. - Included response mapping for consistent API responses.
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import { prisma } from '../src/lib/prisma'
|
||||
|
||||
async function main() {
|
||||
console.log('first')
|
||||
|
||||
await prisma.role.upsert({
|
||||
where: { id: 0, name: 'Admin' },
|
||||
update: {},
|
||||
create: {
|
||||
name: 'Admin',
|
||||
},
|
||||
})
|
||||
}
|
||||
main()
|
||||
.then(async () => {
|
||||
await prisma.$disconnect()
|
||||
})
|
||||
.catch(async e => {
|
||||
console.error(e)
|
||||
await prisma.$disconnect()
|
||||
process.exit(1)
|
||||
})
|
||||
Reference in New Issue
Block a user