import request from '@/config/axios'

// 店铺状态 VO
export interface ShopStatusVO {
  // id
  id: number
  // 名称
  name: string
}

// 店铺状态 API
export const ShopStatusApi = {
  // 查询店铺状态分页
  getShopStatusPage: async (params: any) => {
    return await request.get({ url: `/sale/shop-status/page`, params })
  },

  // 查询店铺状态详情
  getShopStatus: async (id: number) => {
    return await request.get({ url: `/sale/shop-status/get?id=` + id })
  },

  // 新增店铺状态
  createShopStatus: async (data: ShopStatusVO) => {
    return await request.post({ url: `/sale/shop-status/create`, data })
  },

  // 修改店铺状态
  updateShopStatus: async (data: ShopStatusVO) => {
    return await request.put({ url: `/sale/shop-status/update`, data })
  },

  // 删除店铺状态
  deleteShopStatus: async (id: number) => {
    return await request.delete({ url: `/sale/shop-status/delete?id=` + id })
  },

  // 导出店铺状态 Excel
  exportShopStatus: async (params) => {
    return await request.download({ url: `/sale/shop-status/export-excel`, params })
  }
}