build ok,

This commit is contained in:
louiscklaw
2025-06-15 11:28:24 +08:00
parent c319c103f6
commit b7cd25b614
1088 changed files with 4376 additions and 7002 deletions

View File

@@ -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) {