import request from '@/config/axios'

export interface EmployeeYearCostBudgetVO {
  id?: number
  employeeId: number
  employeeName?: string
  budgetYear: number
  expectedCostAmount: number
  remark?: string
  sortNo?: number
  enabledFlag?: boolean
  createTime?: string
}

export interface EmployeeYearCostBudgetPageReqVO extends PageParam {
  employeeId?: number
  employeeName?: string
  budgetYear?: number
  enabledFlag?: boolean
}

export const getEmployeeYearCostBudgetPage = (params: EmployeeYearCostBudgetPageReqVO) => {
  return request.get({ url: '/tjt/employee-year-cost-budget/page', params })
}

export const getEmployeeYearCostBudget = (id: number) => {
  return request.get({ url: '/tjt/employee-year-cost-budget/get', params: { id } })
}

export const createEmployeeYearCostBudget = (data: EmployeeYearCostBudgetVO) => {
  return request.post({ url: '/tjt/employee-year-cost-budget/create', data })
}

export const updateEmployeeYearCostBudget = (data: EmployeeYearCostBudgetVO) => {
  return request.put({ url: '/tjt/employee-year-cost-budget/update', data })
}

export const deleteEmployeeYearCostBudget = (id: number) => {
  return request.delete({ url: '/tjt/employee-year-cost-budget/delete', params: { id } })
}
