import request from '@/config/axios'
// 查询列表
export const getSchoolPage = async (params) => {
  return await request.get({ url: '/admin-api/crm/sch-school/page', params })
}

// 查询详情
export const getSchool = async (id) => {
  return await request.get({ url: '/admin-api/crm/sch-school/get?id=' + id })
}

// 新增
export const createSchool = async (data) => {
  return await request.post({ url: '/admin-api/crm/sch-school/create', data: data })
}

// 修改
export const updateSchool = async (params) => {
  return await request.put({ url: '/admin-api/crm/sch-school/update', data: params })
}

// 删除
export const deleteSchool = async (id) => {
  return await request.delete({ url: '/admin-api/crm/sch-school/delete?id=' + id })
}

export const updateSchoolStatus = async (id, status) => {
  const data = {
    id,
    status
  }
  return request.put({ url: '/admin-api/crm/sch-school/update-status', data: data })
}
