101 lines
2.4 KiB
TypeScript
101 lines
2.4 KiB
TypeScript
import type { PageableParams, PageResponse } from "@/shared/model";
|
|
|
|
export const CNSTP_SE_SAVE_MODE = {
|
|
CREATE: "C",
|
|
UPDATE: "U",
|
|
DELETE: "D",
|
|
} as const;
|
|
|
|
export type CnstpSeSaveMode = (typeof CNSTP_SE_SAVE_MODE)[keyof typeof CNSTP_SE_SAVE_MODE];
|
|
|
|
/** 백엔드 CnstpSeMngResponseDto */
|
|
export interface CnstpSeMngResponseDto {
|
|
cnstpSeCd: string;
|
|
cnstpSeCdNm: string;
|
|
upCnstpCd?: string;
|
|
cdLvNo: number;
|
|
numYn: string;
|
|
dcptUnitCnt: number;
|
|
useYn: string;
|
|
expln?: string;
|
|
sortSeq?: number;
|
|
rgtr?: string;
|
|
rgtrNm?: string;
|
|
mdfr?: string;
|
|
regDt?: string;
|
|
mdfcnDt?: string;
|
|
}
|
|
|
|
/** 백엔드 CnstpSeMngSearchDto + Pageable */
|
|
export interface CnstpSeMngSearchDto extends PageableParams {
|
|
cnstpSeCd?: string;
|
|
cnstpSeCdNm?: string;
|
|
useYn?: string;
|
|
}
|
|
|
|
/** 백엔드 CnstpSeMngSaveRequestDto */
|
|
export interface CnstpSeMngSaveRequestDto {
|
|
cnstpSeCd: string;
|
|
mode: CnstpSeSaveMode;
|
|
cnstpSeCdNm?: string;
|
|
upCnstpCd?: string;
|
|
cdLvNo?: number;
|
|
useYn?: string;
|
|
expln?: string;
|
|
sortSeq?: number;
|
|
numYn?: string;
|
|
dcptUnitCnt?: number;
|
|
}
|
|
|
|
/** PUT /{cnstpSeCd} 요청 (mode는 서비스에서 U로 설정) */
|
|
export interface CnstpSeMngPutRequestDto {
|
|
cnstpSeCd: string;
|
|
cnstpSeCdNm?: string;
|
|
upCnstpCd?: string;
|
|
cdLvNo?: number;
|
|
useYn?: string;
|
|
expln?: string;
|
|
numYn?: string;
|
|
dcptUnitCnt?: number;
|
|
}
|
|
|
|
/** 백엔드 CnstpSeMngTreeDto */
|
|
export interface CnstpSeMngTreeDto {
|
|
indCnstpSeCdNm: string;
|
|
cnstpSeCd: string;
|
|
cnstpSeCdNm: string;
|
|
upCnstpCd?: string;
|
|
useYn: string;
|
|
numYn: string;
|
|
dcptUnitCnt?: number;
|
|
treeLevel: number;
|
|
treePath: string;
|
|
sortPath: string;
|
|
}
|
|
|
|
/** 백엔드 BizSclTreeDto */
|
|
export interface BizSclTreeDto {
|
|
indCnstpSeCdNm: string;
|
|
cnstpSeCd: string;
|
|
cnstpSeCdNm: string;
|
|
useYn: string;
|
|
numYn: string;
|
|
dcptUnitCnt?: number;
|
|
treeLevel: number;
|
|
treePath: string;
|
|
sortPath: string;
|
|
bscPlanQty?: number;
|
|
bgtRfltQty?: number;
|
|
tstmDesignQty?: number;
|
|
}
|
|
|
|
/** Controller public 메서드명·시그니처와 동일 */
|
|
export interface CnstpSeMngService {
|
|
findAll(params: CnstpSeMngSearchDto): Promise<PageResponse<CnstpSeMngResponseDto>>;
|
|
findTree(): Promise<CnstpSeMngTreeDto[]>;
|
|
findById(cnstpSeCd: string): Promise<CnstpSeMngResponseDto>;
|
|
saveMulti(body: CnstpSeMngSaveRequestDto[]): Promise<CnstpSeMngResponseDto[]>;
|
|
update(cnstpSeCd: string, body: CnstpSeMngPutRequestDto): Promise<string>;
|
|
delete(cnstpSeCd: string): Promise<string>;
|
|
}
|