import request from '@/utils/request'

export function voucherCreate(query) {
    return request({
        url: '/system/voucher/rule',
        method: 'post',
        data: query
    })
}

export function voucherList(query) {
    return request({
        url: '/system/voucher/rule/list',
        method: 'get',
        params: query
    })
}
export function voucherEdit(query) {
    return request({
        url: '/system/voucher/rule',
        method: 'put',
        data: query
    })
}
export function voucherRemove(id) {
    return request({
        url: '/system/voucher/rule/' + id,
        method: 'delete',
    })
}
export function voucherEnable(query) {
    return request({
        url: '/system/voucher/enable',
        method: 'get',
        params: query
    })
}