import { Role } from '@/service/moudles/service.dto'

export enum PostMsg {
  GET_AUTH = 'getAuth',
  RELOAD = 'reload',
  GET_PUB_KEY = 'getPubKey',
  GET_SIGN = 'getSign',
  GET_USER_INFO = 'getUserInfo',
  FOCUS_USER = 'focusUser'
}

// 员工信息
export interface Staff {
  "email": string,
  "entId": string,
  "joinTime": number,
  "phone": string,
  "leaderId": string,
  "name": string,
  "position": string,
  "role": Role,
  "depId": string,
  "depName": string,
  "entName": string,
  "id": string,
  "workplace": string,
  "isActivated": boolean
}

// 通讯录
export interface Contacts {
  [key: string]: Array<Staff>
}

// 部门
export interface Department {
  entId: string,
  id: string,
  leaderId: string,
  leaderName?: string,
  name: string,
  parentId: string,
  hasSubDep: boolean,
  staffNum: number,
  children?: Array<Department>
}


export interface LocalStoreEnt {
  avatar:string
  description:string
  id: string
  imServer: string
  name: string
  nodeServer: string
  oaServer: string
  rootDepId:string
}

export interface LocalStoreUsr {
  entId: string,
  depId: string,
  id: string,
  joinTime: number,
  name: string,
  phone: string,
  position: string,
  role: number,
  company?: {
    avator: string,
    description: string,
    id: string,
    imServer: string,
    name: string,
    nodeServer: string,
    oaServer: string,
    rootDepId: string
  }
}