import request from '@/config/axios'

// 课程-标签 VO
export interface CourseLabelVO {
  id: number // 课程标签关联id
  clCourseId: number // 课程id
  clCourseLabelId: string // 课程标签id（字典）
  tenantId: Number // 租户id
}

// 课程-标签 API
export const CourseLabelApi = {
  // 查询课程-标签分页
  getCourseLabelPage: async (params: any) => {
    return await request.get({ url: `/bjdx/course-label/page`, params })
  },

  // 查询课程-标签详情
  getCourseLabel: async (id: number) => {
    return await request.get({ url: `/bjdx/course-label/get?id=` + id })
  },

  // 新增课程-标签
  createCourseLabel: async (data: CourseLabelVO) => {
    return await request.post({ url: `/bjdx/course-label/create`, data })
  },

  // 修改课程-标签
  updateCourseLabel: async (data: CourseLabelVO) => {
    return await request.put({ url: `/bjdx/course-label/update`, data })
  },

  // 删除课程-标签
  deleteCourseLabel: async (id: number) => {
    return await request.delete({ url: `/bjdx/course-label/delete?id=` + id })
  },

  // 导出课程-标签 Excel
  exportCourseLabel: async (params) => {
    return await request.download({ url: `/bjdx/course-label/export-excel`, params })
  }
}
