import request from '@/config/axios'

export type LayerLogVO = {
  id: number
  traceId: string
  projectId:string
  username: string
  nickname:string
  roleIds: number[]
  roleNames : string[]
  deptId : number
  deptName : string
  postIds : number[]
  postNames : string[]
  userType: number
  userId: number
  userName: string
  type: string
  subType: string
  bizId: number
  action: string
  extra: string
  requestMethod: string
  requestUrl: string
  userIp: string
  userAgent: string
  creator: string
  creatorName: string
  createTime: Date
}

// 查询操作日志列表
export const getLayerLogPage = (params: PageParam) => {
  return request.get({ url: '/system/layer-log/page', params })
}
export const pageProjectLayerLog = (params: PageParam) => {
  return request.get({ url: '/system/layer-log/page-project', params})
}

// 导出操作日志
export const exportLayerLog = (params: any) => {
  return request.download({ url: '/system/operate-log/export', params })
}
