This commit is contained in:
koreacomp5
2025-11-02 04:59:09 +09:00
parent c7f7492b9e
commit 9c28d50890
3 changed files with 26 additions and 16 deletions

View File

@@ -370,6 +370,19 @@ async function seedPartnerShops() {
});
}
async function seedBanners() {
// 기존 배너 정리 후 5개만 채움
await prisma.banner.deleteMany({});
const items = Array.from({ length: 5 }).map((_, i) => ({
title: `메인 배너 ${i + 1}`,
imageUrl: "/sample.jpg",
linkUrl: "/",
sortOrder: i + 1,
active: true,
}));
await prisma.banner.createMany({ data: items });
}
async function main() {
await upsertRoles();
const admin = await upsertAdmin();
@@ -380,6 +393,7 @@ async function main() {
const boards = await upsertBoards(admin, categoryMap);
await createPostsForAllBoards(boards, 100, admin);
await seedPartnerShops();
await seedBanners();
await seedPolicies();