import request from '@/axios'
import { REQUEST_BASE } from '@/constants'
import { salespersonLevelData } from './types'
export const getSalespersonLevel = (): Promise<IResponse> => {
  return request.get({ url: `${REQUEST_BASE}/decoration/salesperson_level` })
}
export const addSalespersonLevel = (data: salespersonLevelData): Promise<IResponse> => {
  return request.post({ url: `${REQUEST_BASE}/decoration/salesperson_level`, data })
}
export const delSalespersonLevel = (id: number): Promise<IResponse> => {
  return request.delete({ url: `${REQUEST_BASE}/decoration/salesperson_level/${id}` })
}
export const putSalespersonLevel = (data: salespersonLevelData): Promise<IResponse> => {
  return request.put({ url: `${REQUEST_BASE}/decoration/salesperson_level/${data.id}`, data })
}
