import request from '@/config/axios'

// 门店移动端商家用户关联 VO
export interface StoreUserVO {
  id: number // ID
  shopId: number // 门店ID
  uid: number // 用户id
  status: number // 0-禁止 1-开启
}

// 门店移动端商家用户关联 API
export const StoreUserApi = {
  // 查询门店移动端商家用户关联分页
  getStoreUserPage: async (params: any) => {
    return await request.get({ url: `/store/store-user/page`, params })
  },

  // 查询门店移动端商家用户关联详情
  getStoreUser: async (id: number) => {
    return await request.get({ url: `/store/store-user/get?id=` + id })
  },

  // 新增门店移动端商家用户关联
  createStoreUser: async (data: StoreUserVO) => {
    return await request.post({ url: `/store/store-user/create`, data })
  },

  // 修改门店移动端商家用户关联
  updateStoreUser: async (data: StoreUserVO) => {
    return await request.put({ url: `/store/store-user/update`, data })
  },

  // 删除门店移动端商家用户关联
  deleteStoreUser: async (id: number) => {
    return await request.delete({ url: `/store/store-user/delete?id=` + id })
  },

  // 导出门店移动端商家用户关联 Excel
  exportStoreUser: async (params) => {
    return await request.download({ url: `/store/store-user/export-excel`, params })
  }
}