import { ModuleHttp } from "queenjs/framework";

export default class ListHttp extends ModuleHttp {
  createArtifact(data: any) {
    return this.request("/antique/create", {
      method: "POST",
      data: data,
    });
  }

  updateArtifact(data: any) {
    return this.request(`/antique/update`, { method: "POST", data });
  }

  getArtifactDtl(id: string) {
    return this.request(`/antique/detail/${id}`, {
      method: "GET",
    });
  }

  deleteArtifact(id: string) {
    return this.request(`/antique/delete/${id}`, {
      method: "POST",
    });
  }
  exportArtifact(data: any) {
    return this.request("/antique/export", {
      method: "POST",
      data,
    });
  }

  importArtifact() {
    return this.request("/antique/import", {
      method: "POST",
    });
  }
  getExport(id: string) {
    return this.request(`/anitique/file/${id}`, {
      method: "GET",
    });
  }
}
