import http from '@/axios'
import { PositionBO, PositionQuery, PositionVO } from '@/api/interface/system/position'

class ConfigApi {
  /**
   * @name 查询分页
   * @returns returns
   */
  static page = (params: PositionQuery): Promise<ResultData<any>> => {
    return http.get<PositionVO>({ url: '/system/position/page', params })
  }

  /**
   * @name 查询列表
   * @returns returns
   */
  static list = (params: PositionBO): Promise<ResultData<any>> => {
    return http.get<PositionVO>({ url: '/system/position/list', params })
  }

  /**
   * @name 添加
   * @returns returns
   */
  static add = (data: PositionBO): Promise<ResultData<any>> => {
    return http.post({ url: '/system/position/add', data })
  }

  /**
   * @name 更新
   * @returns returns
   */
  static edit = (data: PositionBO): Promise<ResultData<any>> => {
    return http.put({ url: '/system/position/edit', data })
  }

  /**
   * @name 删除
   * @returns returns
   */
  static delete = (data: string[]): Promise<ResultData<any>> => {
    return http.delete({ url: '/system/position/delete', data })
  }
}
export default ConfigApi
