/** * 사용자 관리 관련 타입 정의 */ // 사용자 정보 인터페이스 (백엔드 API 응답과 일치하는 camelCase) export interface User { sabun?: string; // 사번 userId: string; // 사용자 ID userName: string; // 사용자명 userNameEng?: string; // 영문명 userNameCn?: string; // 중문명 companyCode?: string; // 회사 코드 companyName?: string; // 회사명 deptCode?: string; // 부서 코드 deptName?: string; // 부서명 positionCode?: string; // 직책 코드 positionName?: string; // 직책 email?: string; // 이메일 tel?: string; // 전화번호 cellPhone?: string; // 휴대폰 userType?: string; // 사용자 유형 코드 userTypeName?: string; // 사용자 유형명 regDate?: string; // 등록일 (YYYY-MM-DD) status: string; // 상태 (active, inactive) dataType?: string; // 데이터 타입 endDate?: string; // 퇴사일 locale?: string; // 로케일 rnum?: number; // 행 번호 } // 사용자 검색 필터 export interface UserSearchFilter { // 통합 검색 (우선순위: 가장 높음) searchValue?: string; // 통합 검색어 (모든 필드 대상) // 단일 필드 검색 (중간 우선순위) searchType?: "all" | "sabun" | "companyCode" | "deptName" | "positionName" | "userId" | "userName" | "tel" | "email"; // 검색 대상 (하위 호환성) // 고급 검색 (개별 필드별 AND 조건) search_sabun?: string; // 사번 검색 search_companyName?: string; // 회사명 검색 search_deptName?: string; // 부서명 검색 search_positionName?: string; // 직책 검색 search_userId?: string; // 사용자 ID 검색 search_userName?: string; // 사용자명 검색 search_tel?: string; // 전화번호 검색 (TEL + CELL_PHONE) search_email?: string; // 이메일 검색 } // 사용자 목록 테이블 컬럼 정의 export interface UserTableColumn { key: string; label: string; sortable?: boolean; width?: string; } // 사용자 등록/수정 폼 데이터 export interface UserFormData { userId: string; userName: string; deptCode: string; deptName: string; positionName: string; email: string; tel: string; cellPhone: string; userTypeName: string; status: string; } // 사용자 상태 상수 export const USER_STATUS = { ACTIVE: "active", INACTIVE: "inactive", } as const; // 사용자 상태 라벨 export const USER_STATUS_LABELS = { [USER_STATUS.ACTIVE]: "활성", [USER_STATUS.INACTIVE]: "비활성", } as const;