import ajax from "@/libs/Ajax";

let NAME_SPACE = '/sys/file';
export default {
  /**
   * 加载文件数据
   * @param {String} uuid
   */
  list(params) {
    return ajax.get(`${NAME_SPACE}/list`, {params: params});
  },
  /**
   * 删除
   * @param {String} uuid
   */
  delete(uuid) {
    return ajax.delete(`${NAME_SPACE}/delete`, {params: {uuid: uuid}});
  },
  /**
   * 使用文件
   * @param {String} uuid
   */
  use(uuid) {
    return ajax.delete(`${NAME_SPACE}/use`, {params: {uuid: uuid}});
  },
  /**
   * 生效一批数据
   * @param {String} uuid
   */
  useAll(uuid) {
    return ajax.delete(`${NAME_SPACE}/useAll`, {params: {uuid: uuid}});
  }
};
