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

const prefix = 'mall-membership-level/';
/**
 * 分页查询店铺会员等级列表
 * @param data
 */
export async function getStoreMembershipLevelListApi(data: any) {
  return requestClient.get<any>(`${prefix}list`, { params: data });
}

/**
 * 获取店铺会员等级下拉列表
 */
export async function getStoreMembershipLevelOptionApi() {
  return requestClient.get<any>(`${prefix}option`);
}

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

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

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

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