style: 统一全仓代码格式

This commit is contained in:
que01 committed 2026-09-19 18:46:26 +08:00
1 parent d811478d0f
commit 8033cabff9
30 files changed
+1183 -187

No files matched your search

+27 -25
View File
@@ -20,33 +20,35 @@ async function main(): Promise<void> {
});
const services = [
{
brandId: brand.id,
name: "红烧肉双拼套餐",
description: "红烧肉、时蔬、米饭",
priceText: "¥28 / 份",
priceAmount: 2800,
sortOrder: 1,
},
{
brandId: brand.id,
name: "小炒鸡套餐",
description: "现炒鸡块、时蔬、米饭",
priceText: "¥25 / 份",
priceAmount: 2500,
sortOrder: 2,
},
{
brandId: brand.id,
name: "家庭聚餐私厨",
description: "根据人数、地点和口味人工沟通报价",
priceText: "面议",
bookingEnabled: true,
sortOrder: 3,
},
{
brandId: brand.id,
name: "红烧肉双拼套餐",
description: "红烧肉、时蔬、米饭",
priceText: "¥28 / 份",
priceAmount: 2800,
sortOrder: 1,
},
{
brandId: brand.id,
name: "小炒鸡套餐",
description: "现炒鸡块、时蔬、米饭",
priceText: "¥25 / 份",
priceAmount: 2500,
sortOrder: 2,
},
{
brandId: brand.id,
name: "家庭聚餐私厨",
description: "根据人数、地点和口味人工沟通报价",
priceText: "面议",
bookingEnabled: true,
sortOrder: 3,
},
];
for (const service of services) {
const existing = await prisma.service.findFirst({ where: { brandId: brand.id, name: service.name } });
const existing = await prisma.service.findFirst({
where: { brandId: brand.id, name: service.name },
});
if (existing) await prisma.service.update({ where: { id: existing.id }, data: service });
else await prisma.service.create({ data: service });
}