import { requestClient } from '#/api/request';

const prefix = 'mall-classification/';
/**
 * 分页查询店铺行业列表
 * @param data
 */
export async function getStoreClassificationListApi(data: any) {
  return requestClient.get<any>(`${prefix}list`, { params: data });
}

/**
 * 获取店铺行业详情
 */
export async function getStoreClassificationOptionApi() {
  return requestClient.get<any>(`${prefix}option`);
}

/**
 * 获取店铺行业详情
 * @param id
 */
export async function getStoreClassificationInfoApi(id: number) {
  return requestClient.get<any>(`${prefix}detail`, { params: { id } });
}

/**
 * 新增店铺行业
 * @param data
 */
export async function createStoreClassificationApi(data: Record<string, any>) {
  return requestClient.post<any>(`${prefix}create`, data);
}

/**
 * 编辑店铺行业
 * @param data
 */
export async function updateStoreClassificationApi(data: Record<string, any>) {
  return requestClient.post<any>(`${prefix}update`, data);
}

/**
 * 删除店铺行业
 * @param data
 */
export async function deleteStoreClassificationApi(data: Record<string, any>) {
  return requestClient.post<any>(`${prefix}delete`, data);
}
