diff options
| author | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-03-26 00:37:41 +0000 |
|---|---|---|
| committer | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-03-26 00:37:41 +0000 |
| commit | e0dfb55c5457aec489fc084c4567e791b4c65eb1 (patch) | |
| tree | 68543a65d88f5afb3a0202925804103daa91bc6f /config/roleColumnsConfig.ts | |
3/25 까지의 대표님 작업사항
Diffstat (limited to 'config/roleColumnsConfig.ts')
| -rw-r--r-- | config/roleColumnsConfig.ts | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/config/roleColumnsConfig.ts b/config/roleColumnsConfig.ts new file mode 100644 index 00000000..6da8bf50 --- /dev/null +++ b/config/roleColumnsConfig.ts @@ -0,0 +1,62 @@ +import { RoleView } from "@/db/schema/users"; + +/** + * 테이블/엑셀에 보여줄 컬럼 한 칸을 어떻게 렌더링할지 결정하는 설정 + */ +export interface ColumnConfig { + /** + * "조인 결과" 객체(UserWithCompanyAndRoles)의 어느 필드를 표시할지 + */ + id: keyof RoleView; + + /** 화면·엑셀에서 보여줄 컬럼명 */ + label: string; + + /** (선택) 그룹핑/카테고리 */ + group?: string; + + /** (선택) Excel에서의 헤더 */ + excelHeader?: string; + + /** (선택) 데이터 타입(예: date, string, number 등), 포맷 지정용 */ + type?: string; +} + +/** + * 실제로 "User + Company + Roles" 정보 테이블에서 + * 어떤 컬럼들을 어떤 순서로 표시할 것인지 정의. + */ +export const roleColumnsConfig: ColumnConfig[] = [ + { + id: "name", + label: "Role Name", + excelHeader: "Role Name", + }, + { + id: "description", + label: "Role Description", + excelHeader: "Role Description", + }, + { + id: "user_count", + label: "할당 User 수", + excelHeader: "Role에 할당된 User 수", + }, + + { + id: "created_at", + label: "생성일", + excelHeader: "생성일", + }, + + { + id: "domain", + label: "롤 도메인", + excelHeader: "롤 도메인", + }, + { + id: "company_name", + label: "회사명", + excelHeader: "회사명", + }, +];
\ No newline at end of file |
