diff options
| author | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-06-30 08:28:13 +0000 |
|---|---|---|
| committer | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-06-30 08:28:13 +0000 |
| commit | 5b6313f16f508882a0ea67716b7dbaa1c6967f04 (patch) | |
| tree | 3d1d8dafea2f31274ace3fbda08333e889e06d1c /config/userAccessColumnsConfig.ts | |
| parent | 3f0fad18483a5c800c79c5e33946d9bb384c10e2 (diff) | |
(대표님) 20250630 16시 - 유저 도메인별 라우터 분리와 보안성검토 대응
Diffstat (limited to 'config/userAccessColumnsConfig.ts')
| -rw-r--r-- | config/userAccessColumnsConfig.ts | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/config/userAccessColumnsConfig.ts b/config/userAccessColumnsConfig.ts new file mode 100644 index 00000000..c89ff7ee --- /dev/null +++ b/config/userAccessColumnsConfig.ts @@ -0,0 +1,65 @@ +import { User } from "@/db/schema"; + +/** + * 테이블/엑셀에 보여줄 컬럼 한 칸을 어떻게 렌더링할지 결정하는 설정 + */ +export interface UserColumnConfig { + /** + * "조인 결과" 객체(UserWithCompanyAndRoles)의 어느 필드를 표시할지 + */ + id: keyof User; + + /** 화면·엑셀에서 보여줄 컬럼명 */ + label: string; + + /** (선택) 그룹핑/카테고리 */ + group?: string; + + /** (선택) Excel에서의 헤더 */ + excelHeader?: string; + + /** (선택) 데이터 타입(예: date, string, number 등), 포맷 지정용 */ + type?: string; +} + +/** + * 실제로 "User + Company + Roles" 정보 테이블에서 + * 어떤 컬럼들을 어떤 순서로 표시할 것인지 정의. + */ +export const userAccessColumnsConfig: UserColumnConfig[] = [ + { + id: "name", + label: "사용자명", + excelHeader: "User Name", + }, + { + id: "email", + label: "Email", + excelHeader: "Email", + }, + // { + // id: "company_name", + // label: "Company Name", + // excelHeader: "Company Name", + // }, + { + id: "deptName", + label: "부서", + excelHeader: "부서", + // type: "string[]", // 필요하면 추가 + }, + + { + id: "domain", + label: "도메인", + excelHeader: "도메인", + // type: "string[]", // 필요하면 추가 + }, + // 필요 시 createdAt도 조인해서 가져왔다면 아래처럼 추가 + { + id: "createdAt", + label: "생성일", + excelHeader: "생성일t", + // group: "Metadata", + }, +];
\ No newline at end of file |
