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

const prefix = 'product-label-relations/';
/**
 * 分页查询商品标签关联列表
 * @param data
 */
export async function getProduct_label_relationsListApi(data: any) {
  return requestClient.get<any>(`${prefix}list`, { params: data });
}

/**
 * 获取商品标签关联下拉列表
 */
export async function getProduct_label_relationsOptionApi() {
  return requestClient.get<any>(`${prefix}option`);
}

/**
 * 获取商品标签关联详情
 * @param id
 */
export async function getProduct_label_relationsInfoApi(id: number) {
  return requestClient.get<any>(`${prefix}detail`, { params: { id } });
}

/**
 * 新增商品标签关联
 * @param data
 */
export async function createProduct_label_relationsApi(
  data: Record<string, any>,
) {
  return requestClient.post<any>(`${prefix}create`, data);
}

/**
 * 编辑商品标签关联
 * @param data
 */
export async function updateProduct_label_relationsApi(
  data: Record<string, any>,
) {
  return requestClient.post<any>(`${prefix}update`, data);
}

/**
 * 删除商品标签关联
 * @param data
 */
export async function deleteProduct_label_relationsApi(
  data: Record<string, any>,
) {
  return requestClient.post<any>(`${prefix}delete`, data);
}
