10.4 공지/배너 등록 및 노출 설정 o

This commit is contained in:
koreacomp5
2025-10-09 18:42:50 +09:00
parent 375f4c5681
commit 0d18893374
9 changed files with 170 additions and 12 deletions

View File

@@ -0,0 +1,19 @@
-- CreateTable
CREATE TABLE "banners" (
"id" TEXT NOT NULL PRIMARY KEY,
"title" TEXT NOT NULL,
"imageUrl" TEXT NOT NULL,
"linkUrl" TEXT,
"active" BOOLEAN NOT NULL DEFAULT true,
"sortOrder" INTEGER NOT NULL DEFAULT 0,
"startAt" DATETIME,
"endAt" DATETIME,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL
);
-- CreateIndex
CREATE INDEX "banners_active_sortOrder_idx" ON "banners"("active", "sortOrder");
-- CreateIndex
CREATE INDEX "banners_startAt_endAt_idx" ON "banners"("startAt", "endAt");

View File

@@ -632,6 +632,24 @@ model Partner {
@@map("partners")
}
// 배너/공지 노출용
model Banner {
id String @id @default(cuid())
title String
imageUrl String
linkUrl String?
active Boolean @default(true)
sortOrder Int @default(0)
startAt DateTime?
endAt DateTime?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@index([active, sortOrder])
@@index([startAt, endAt])
@@map("banners")
}
// 제휴 문의
model PartnerInquiry {
id String @id @default(cuid())