import request from '@/config/axios'

export interface RecipePointVO {
  id: number
  recipeId?: number | string
  name?: string
  refer?: string
  dataUnit?: string
  remark?: string
  max?: string
  min?: string
  dataType?: string
  createTime?: string
}

export const RecipePointApi = {
  getRecipePointPage: async (params: any) => {
    return await request.get({ url: `/iot/recipe-point/page`, params })
  },
  getRecipePointList: async (recipeId: number) => {
    return await request.get({ url: `/iot/recipe-point/list?id=`+ recipeId })
  },
    createRecipePoint: async (data: RecipePointVO) => {
      return await request.post({ url: `/iot/recipe-point/create`, data })
    },
    updateRecipePoint: async (data: RecipePointVO) => {
      return await request.post({ url: `/iot/recipe-point/update`, data })
    },
      deleteRecipePoint: async (id: number) => {
        return await request.delete({ url: `/iot/recipe-point/delete?id=` + id })
      },
}

