import request from '@/config/axios'

// 维保项目 VO
export interface MoldRecordSubjectVO {
  id: number // ID
  subject: string // 项目
  expect: string // 预期
}

// 维保项目 API
export const MoldRecordSubjectApi = {
  // 查询维保项目分页
  getMoldRecordSubjectPage: async (params: any) => {
    return await request.get({ url: `/mes/mold-record-subject/page`, params })
  },

  // 查询维保项目详情
  getMoldRecordSubject: async (id: number) => {
    return await request.get({ url: `/mes/mold-record-subject/get?id=` + id })
  },

  // 新增维保项目
  createMoldRecordSubject: async (data: MoldRecordSubjectVO) => {
    return await request.post({ url: `/mes/mold-record-subject/create`, data })
  },

  // 修改维保项目
  updateMoldRecordSubject: async (data: MoldRecordSubjectVO) => {
    return await request.put({ url: `/mes/mold-record-subject/update`, data })
  },

  // 删除维保项目
  deleteMoldRecordSubject: async (id: number) => {
    return await request.delete({ url: `/mes/mold-record-subject/delete?id=` + id })
  },
  // 查询维保项目列表
  getList: async (params: any) => {
    return await request.get({ url: `/mes/mold-record-subject/getList`, params })
  },
  // 导出维保项目 Excel
  exportMoldRecordSubject: async (params) => {
    return await request.download({ url: `/mes/mold-record-subject/export-excel`, params })
  }

}
