declare namespace API {
  /** 用户公告分页 */
  type UserMessagePageResultItem = {
    msgId: string
    messageType: string
    title: string
    content: string
    sendFlag: boolean
    allFlag: boolean
    sortOrder: number
    delFlag: string
    tenantId: string
    readFlag: string
    createdTime: string
  }
  type UserMessagePageResult = UserMessagePageResultItem[]

  /** 信息阅读列表 */
  type MessageReadPageResultItem = {
    createdBy: string
    modifiedBy: string
    createdTime: string
    modifiedTime: string
    msgId: string
    messageType: string
    title: string
    content: string
    sendFlag: boolean
    allFlag: boolean
    sortOrder: number
    delFlag: string
    tenantId: string
  }
  type MessageReadPageResult = MessageReadPageResultItem[]

  /** 修改站内信入参 */
  type UpdateMessageParam = {
    allFlag: boolean
    content: string
    messageType: 'ANNOUNCEMENT' | 'EMAIL' | 'INNER_MSG'
    msgId: number
    sortOrder: number
    title: string
    userList: number[] | string[]
  }
  /** 新增站内信入参 */
  type AddMessageParam = Omit<UpdateMessageParam, 'msgId'>

  /** 查询全部部门（包含用户） */
  interface Employee {
    id: string
    name: string
    type: string
    selected: boolean
    avatar: string
  }

  interface ChildDepartment {
    id: string
    name: string
    type: string
    selected: boolean
    avatar?: any
  }
  type AllDeptUser = {
    titleDepartments: any[]
    roleList: any[]
    employees: Employee[]
    childDepartments: ChildDepartment[]
  }
}
