import request from '@/utils/request'

// Query Code Template File List by Template ID
export function listTemplateFilesByTemplateId(templateId) {
  return request({
    url: `/generator/templateFile/listByTemplateId/${templateId}`,
    method: 'get'
  })
}

// Get Code Template File Details
export function getTemplateFile(templateFileId) {
  return request({
    url: `/generator/templateFile/${templateFileId}`,
    method: 'get'
  })
}

// Add New Code Template File
export function addTemplateFile(data) {
  return request({
    url: '/generator/templateFile',
    method: 'post',
    data: data
  })
}

// Modify Code Template File
export function updateTemplateFile(data) {
  return request({
    url: '/generator/templateFile',
    method: 'put',
    data: data
  })
}

// Delete Code Template File(s)
// Takes a single ID or a comma-separated string of IDs
export function delTemplateFile(templateFileIds) {
  return request({
    url: `/generator/templateFile/${templateFileIds}`,
    method: 'delete'
  })
}

// Delete Code Template Files by Template ID
export function delTemplateFilesByTemplateId(templateId) {
  return request({
    url: `/generator/templateFile/deleteByTemplateId/${templateId}`,
    method: 'delete'
  })
} 