관리자페이지 작업
This commit is contained in:
@@ -141,6 +141,12 @@ model Board {
|
||||
categoryId String?
|
||||
category BoardCategory? @relation(fields: [categoryId], references: [id], onDelete: SetNull)
|
||||
|
||||
// 뷰 타입 설정 (동적 테이블 참조)
|
||||
mainPageViewTypeId String?
|
||||
mainPageViewType BoardViewType? @relation("MainPageViewType", fields: [mainPageViewTypeId], references: [id], onDelete: SetNull)
|
||||
listViewTypeId String?
|
||||
listViewType BoardViewType? @relation("ListViewType", fields: [listViewTypeId], references: [id], onDelete: SetNull)
|
||||
|
||||
posts Post[]
|
||||
moderators BoardModerator[]
|
||||
|
||||
@@ -150,9 +156,29 @@ model Board {
|
||||
@@index([status, sortOrder])
|
||||
@@index([type, requiresApproval])
|
||||
@@index([categoryId])
|
||||
@@index([mainPageViewTypeId])
|
||||
@@index([listViewTypeId])
|
||||
@@map("boards")
|
||||
}
|
||||
|
||||
// 게시판 뷰 타입 정의 (enum 대신 데이터 테이블)
|
||||
model BoardViewType {
|
||||
id String @id @default(cuid())
|
||||
key String @unique // 예: preview, text, special_rank
|
||||
name String // 표시용 이름
|
||||
scope String // 용도 구분: 'main' | 'list' 등 자유 텍스트
|
||||
|
||||
// 역참조
|
||||
mainBoards Board[] @relation("MainPageViewType")
|
||||
listBoards Board[] @relation("ListViewType")
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
@@index([scope])
|
||||
@@map("board_view_types")
|
||||
}
|
||||
|
||||
// 게시판 운영진 매핑
|
||||
model BoardModerator {
|
||||
id String @id @default(cuid())
|
||||
@@ -703,3 +729,14 @@ model PartnerRequest {
|
||||
@@index([status, createdAt])
|
||||
@@map("partner_requests")
|
||||
}
|
||||
|
||||
// 시스템 설정 (key-value 형태)
|
||||
model Setting {
|
||||
id String @id @default(cuid())
|
||||
key String @unique
|
||||
value String // JSON 문자열로 저장
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
@@map("settings")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user