// 灵活用工
import { otherHttp } from '/@/utils/http/axios'

enum Api {
    employmentList = '/employment/app/list', // 用工列表
    employmentAdd = '/employment/app/add', // 发布用工
    employmentDetails = '/employment/queryById', // 查看用工详情
    employmentEdit = '/employment/app/edit', // 编辑用工
    employmentRegister = '/employment/app/register', // 报名用工
}
/**
 * @param params 请求参数
 * @description: 用工列表
 */
export function employmentList(params = {}) {
    return otherHttp.get({
        url: Api.employmentList,
        params,
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded',
        },
    })
}

/**
 * @param params 请求参数
 * @description: 发布用工
 */
export function employmentAdd(params = {}) {
    return otherHttp.post({
        url: Api.employmentAdd,
        params,
    })
}

/**
 * @param params 请求参数
 * @description: 发布用工
 */
export function employmentDetails(params = {}) {
    return otherHttp.get({
        url: Api.employmentDetails,
        params,
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded',
        },
    })
}

/**
 * @param params 请求参数
 * @description: 编辑用工
 */
export function employmentEdit(params = {}) {
    return otherHttp.post({
        url: Api.employmentEdit,
        params,
    })
}

/**
 * @param params 请求参数
 * @description: 报名用工
 */
export function employmentRegister(params = {}) {
    return otherHttp.post({
        url: Api.employmentRegister,
        params,
    })
}
