import request from '../utils/request'

/**
 * 获取创意列表
 */
export function getCreativeList(params) {
  return request({
    url: '/api/ad-plan-creative/list',
    method: 'get',
    params
  })
}

/**
 * 根据计划ID获取创意列表
 */
export function getCreativesByPlanId(planId) {
  return request({
    url: `/api/ad-plan-creative/plan/${planId}`,
    method: 'get'
  })
}

/**
 * 获取创意详情
 */
export function getCreativeDetail(creativeId) {
  return request({
    url: `/api/ad-plan-creative/${creativeId}`,
    method: 'get'
  })
}

/**
 * 删除创意
 */
export function deleteCreative(creativeId) {
  return request({
    url: `/api/ad-plan-creative/${creativeId}`,
    method: 'delete'
  })
}
