10.4 공지/배너 등록 및 노출 설정 o
This commit is contained in:
19
prisma/migrations/20251009093736_add_banner/migration.sql
Normal file
19
prisma/migrations/20251009093736_add_banner/migration.sql
Normal 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");
|
||||
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user