import request from "../utils/request"

// 获取笔记列表
export function getScheduleListApi(page, limit, classify) {
  return request({
    url: `/admin/schedule/${page}/${limit}?classify=${classify}`,
    method: "get",
  })
}

// 获取今日笔记
export function getTodayScheduleApi() {
  return request({
    url: `/admin/schedule/last`,
    method: "get",
  })
}

// 获取笔记详情
export function getScheduleDetailApi(id) {
  return request({
    url: `/admin/schedule/get/${id}`,
    method: "get",
  })
}

// 删除笔记
export function deleteScheduleApi(id) {
  return request({
    url: `/admin/schedule/remove/${id}`,
    method: "delete",
  })
}

// 保存笔记
export function saveScheduleApi(data) {
  return request({
    url: `/admin/schedule/save`,
    method: "post",
    data,
  })
}

// 更新笔记
export function updateScheduleApi(data) {
  return request({
    url: `/admin/schedule/update`,
    method: "put",
    data,
  })
}

