import request from "@/utils/request";
import { Drawing} from "./types";

/**
 * 修改图纸启用，禁用状态
 *
 * @param id
 * @param data
 */
export function updateDrawaing(data: Drawing) {
  return request({
    url: "/api/v1/base/drawing/update",
    method: "post",
    data: data,
  });
}


/**
 * 新增图纸
 *
 * @param data
 */
export function addDrawing(data: Object) {
  return request({
    url: "/api/v1/base/drawing/add",
    method: "post",
    data: data,
  });
}


/**
 * 获取图纸版本
 *
 * @param materialCode 物料编码
 */
export function getDrawing(materialCode: String) {
  return request({
    url: "/api/v1/base/drawing/list/"+materialCode,
    method: "get",
  });
}
