import request from '@/utils/axios.ts';

// 屠宰场管理
export function slaughterHouseList(data) {
    return request({
        url: '/slaughter/house/list',
        method: 'POST',
        data,
    });
}

export function slaughterHouseAdd(data) {
    return request({
        url: '/slaughter/house/add',
        method: 'POST',
        data,
    });
}

export function slaughterHouseEdit(data) {
    return request({
        url: '/slaughter/house/edit',
        method: 'POST',
        data,
    });
}

export function slaughterHouseDel(id) {
    return request({
        url: `/slaughter/house/delete?id=${id}`,
        method: 'GET',
    });
}

export function slaughterHouseDetail(id) {
    return request({
        url: `/slaughter/house/detail?id=${id}`,
        method: 'GET',
    });
}

export function slaughterHouseAll() {
    return request({
        url: '/slaughter/house/all',
        method: 'GET',
    });
}

// 进场管理
export function slaughterEntryList(data) {
    return request({
        url: '/slaughter/entry/list',
        method: 'POST',
        data,
    });
}

export function slaughterEntryAdd(data) {
    return request({
        url: '/slaughter/entry/add',
        method: 'POST',
        data,
    });
}

export function slaughterEntryEdit(data) {
    return request({
        url: '/slaughter/entry/edit',
        method: 'POST',
        data,
    });
}

export function slaughterEntryDel(id) {
    return request({
        url: `/slaughter/entry/delete?id=${id}`,
        method: 'GET',
    });
}

export function slaughterEntryDetail(id) {
    return request({
        url: `/slaughter/entry/detail?id=${id}`,
        method: 'GET',
    });
}

