build ok,
This commit is contained in:
@@ -82,32 +82,8 @@ async function getProduct(productId: string): Promise<ProductItem | null> {
|
||||
});
|
||||
}
|
||||
|
||||
async function createProduct(createForm: CreateProduct) {
|
||||
// return prisma.productItem.create({
|
||||
// data: {
|
||||
// ...createForm,
|
||||
// code: createForm.code || '',
|
||||
// taxes: createForm.taxes || 0,
|
||||
// tags: createForm.tags || [],
|
||||
// sizes: createForm.sizes || [],
|
||||
// gender: createForm.gender || [],
|
||||
// colors: createForm.colors || [],
|
||||
// category: createForm.category || '',
|
||||
// quantity: createForm.quantity || 0,
|
||||
// available: createForm.available || 0,
|
||||
// coverUrl: createForm.coverUrl || '',
|
||||
// images: createForm.images || [],
|
||||
// description: createForm.description || '',
|
||||
// subDescription: createForm.subDescription || '',
|
||||
// publish: createForm.publish || 'published',
|
||||
// totalSold: createForm.totalSold || 0,
|
||||
// totalRatings: createForm.totalRatings || 0,
|
||||
// totalReviews: createForm.totalReviews || 0,
|
||||
// inventoryType: createForm.inventoryType || '',
|
||||
// ratings: createForm.ratings || [],
|
||||
// reviews: createForm.reviews || [],
|
||||
// },
|
||||
// });
|
||||
async function createProduct(productData: any) {
|
||||
return await prisma.productItem.create({ data: productData });
|
||||
}
|
||||
|
||||
async function updateProduct(productId: string, updateForm: UpdateProduct) {
|
||||
|
Reference in New Issue
Block a user