import { CharactarRole } from "../model/charactar-role.model"; import { CharactarRoleSearchParam } from "../search/charactar-role-search-param.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 CharactarRoleService { static PATH = '/charactarrole'; constructor(private httpHandler: HttpHandler) {} createCharactarRole(charactarRole: CharactarRole, header?: any): Promise { return this.httpHandler.post(`${HostConfig.DEV_HOST}${CharactarRoleService.PATH}/create` ,charactarRole, header); } updateCharactarRole(charactarRole: CharactarRole, header?: any): Promise { return this.httpHandler.post(`${HostConfig.DEV_HOST}${CharactarRoleService.PATH}/update` ,charactarRole, header); } searchCharactarRole(charactarRoleSearchParam: CharactarRoleSearchParam,page: number,size: number, header?: any): Promise> { return this.httpHandler.post>(`${HostConfig.DEV_HOST}${CharactarRoleService.PATH}/search?page=${page}&size=${size}` ,charactarRoleSearchParam, header); } searchList(charactarRoleSearchParam: CharactarRoleSearchParam, header?: any): Promise> { return this.httpHandler.post>(`${HostConfig.DEV_HOST}${CharactarRoleService.PATH}/searchList` ,charactarRoleSearchParam, header); } }