import { get, post, download } from '../http'

const driver = {
  // {
  //   "pageSize": 10,
  //   "pageNo": 1,
  //   "pageVo": {
  //     "criteria": "test"
  //   }
  // }
  fetchDriverPages(data) {
    return post('driver/getDriverPages', data)
  },
  // userPk
  fetchDriverDetail(params) {
    return get('driver/getDriverDetail', params)
  },
  // {
  //   "groupPk": 1,
  //   "nickName": "nickName",
  //   "email": "email@qq.com",
  //   "pdvLicence": "132321321321323",
  //   "phone": 13122222222,
  //   "pdvLicencePictures": [
  //     "/juicePicture/userProfile/906c9fe4bae144bf8f2b85b4dff6b336.jpg",
  //     "/juicePicture/userProfile/906c9fe4bae144bf8f2b85b4dff6b336.jpg"
  //   ]
  // }
  addDriver(data) {
    return post('driver/addDriver', data)
  },
  // {
  //   "userPk": 109,
  //   "groupPk": 1,
  //   "nickName": "nickName1",
  //   "email": "email@qq.com",
  //   "pdvLicence": "132321321321323",
  //   "phone": 13122222222,
  //   "pdvLicencePictures": [
  //     "/juicePicture/userProfile/906c9fe4bae144bf8f2b85b4dff6b336.jpg",
  //     "/juicePicture/userProfile/906c9fe4bae144bf8f2b85b4dff6b336.jpg"
  //   ]
  // }
  updateDriver(data) {
    return post('driver/updateDriver', data)
  },
  // userPk
  deleteDriver(params) {
    return get('driver/delDriver', params)
  },
  // userPk
  approveDriver(params) {
    return get('driver/approveDriver', params)
  },
  // userPk
  rejectDriver(params) {
    return get('driver/rejectDriver', params)
  },
  downloadTemplate() {
    return download('driver/download/template')
  }
}

export default driver;