import { OrgEquipmentInfo } from "../model/org-equipment-info.model"; import { HostConfig } from '../config/host.config'; import { Injectable } from '@angular/core'; import { HttpHandler } from './http-handler.service'; import { Page } from '../response/page.type'; @Injectable({ providedIn: 'root', }) export class OrgEquipmentInfoService { static PATH = '/orgEquipmentInfo'; constructor(private httpHandler: HttpHandler) {} createEquipmentInfo(orgEquipmentInfo: OrgEquipmentInfo, header?: any): Promise { return this.httpHandler.post(`${HostConfig.DEV_HOST}${OrgEquipmentInfoService.PATH}/create` ,orgEquipmentInfo, header); } updateEquipmentInfo(orgEquipmentInfo: OrgEquipmentInfo, header?: any): Promise { return this.httpHandler.post(`${HostConfig.DEV_HOST}${OrgEquipmentInfoService.PATH}/update` ,orgEquipmentInfo, header); } findByOrgId(orgId: number, header?: any): Promise> { return this.httpHandler.get>(`${HostConfig.DEV_HOST}${OrgEquipmentInfoService.PATH}/findByOrgId/${orgId}`, header); } remove(id: number, header?: any): Promise { return this.httpHandler.delete(`${HostConfig.DEV_HOST}${OrgEquipmentInfoService.PATH}/remove/${id}`, header); } }