import {
    CurrencyCoinQueryParam,
    CurrencyCoinPageResult,
    CurrencyCoinFormData,
    CurrencyCoinItem,
} from "@/types/api/system/currency-coin";
import request from "@/utils/request";
import { AxiosPromise } from "axios";

export function currencyCoinPageQuery(data: CurrencyCoinQueryParam): AxiosPromise<CurrencyCoinPageResult> {
    return request({
        url: "admin/system/currency-coin/page-query",
        method: "post",
        params: data,
    });
}

export function currencyCoinList(): AxiosPromise<CurrencyCoinItem[]> {
    return request({
        url: "admin/system/currency-coin/list",
        method: "get",
    });
}

export function createCurrencyCoin(data: CurrencyCoinFormData): any {
    return request({
        url: "admin/system/currency-coin/create",
        method: "post",
        params: data,
    });
}

export function updateCurrencyCoin(data: CurrencyCoinFormData): any {
    return request({
        url: "admin/system/currency-coin/update",
        method: "post",
        params: data,
    });
}

export function deleteCurrencyCoin(ids: string): any {
    return request({
        url: "admin/system/currency-coin/deletes",
        method: "post",
        params: { ids },
    });
}
