summaryrefslogtreecommitdiff
path: root/db/schema/information.ts
blob: 43d0d0c7782a73a45dff801b2847832271ea960c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { pgTable, varchar, timestamp, serial, boolean, text as textArea } from "drizzle-orm/pg-core";

// 페이지별 인포메이션 관리 테이블
export const pageInformation = pgTable("page_information", {
  id: serial("id").primaryKey(),
  
  // 페이지 정보
  pagePath: varchar("page_path", { length: 100 }).notNull().unique(), // 페이지 경로 (예: '/evcp/vendor-list', '/evcp/project-detail')
  pageName: varchar("page_name", { length: 255 }).notNull(), // 페이지명 (menuConfig의 title에서 자동 저장)
  
  informationContent: textArea("information_content").notNull(), // 설명 내용
  
  // 첨부파일 정보
  attachmentFileName: varchar("attachment_file_name", { length: 255 }), // 첨부파일 원본명
  attachmentFilePath: varchar("attachment_file_path", { length: 1024 }), // 첨부파일 저장 경로
  attachmentFileSize: varchar("attachment_file_size", { length: 50 }), // 첨부파일 크기
  
  // 활성화 여부
  isActive: boolean("is_active").default(true).notNull(), // 활성화 여부
  
  // 메타데이터
  createdAt: timestamp("created_at").defaultNow().notNull(),
  updatedAt: timestamp("updated_at").defaultNow().notNull(),
});

export type PageInformation = typeof pageInformation.$inferSelect;
export type NewPageInformation = typeof pageInformation.$inferInsert;