import request from '@/config/axios'

export interface TagRelationsVO {
  id: number
  memberId: number
  tagId: number
}

// 查询会员标签列表
export const getTagRelationsPage = async (params) => {
  return await request.get({ url: `/member/tag-relations/page`, params })
}

// 查询会员标签详情
export const getTagRelations = async (id: number) => {
  return await request.get({ url: `/member/tag-relations/get?id=` + id })
}

// 新增会员标签
export const createTagRelations = async (data: TagRelationsVO) => {
  return await request.post({ url: `/member/tag-relations/create`, data })
}

// 修改会员标签
export const updateTagRelations = async (data: TagRelationsVO) => {
  return await request.put({ url: `/member/tag-relations/update`, data })
}

// 删除会员标签
export const deleteTagRelations = async (id: number) => {
  return await request.delete({ url: `/member/tag-relations/delete?id=` + id })
}

// 导出会员标签 Excel
export const exportTagRelations = async (params) => {
  return await request.download({ url: `/member/tag-relations/export-excel`, params })
}
