ERP-node/frontend/types/barcode.ts

87 lines
1.9 KiB
TypeScript
Raw Normal View History

2026-03-04 20:51:00 +09:00
/**
*
* ZD421 릿/
*/
// 캔버스 요소 (디자이너용)
export interface BarcodeLabelComponent {
id: string;
type: "text" | "barcode" | "image" | "line" | "rectangle";
x: number;
y: number;
width: number;
height: number;
zIndex: number;
content?: string;
fontSize?: number;
fontColor?: string;
fontWeight?: string;
barcodeType?: string;
barcodeValue?: string;
showBarcodeText?: boolean;
imageUrl?: string;
objectFit?: string;
lineColor?: string;
lineWidth?: number;
backgroundColor?: string;
}
export interface BarcodeLabelLayout {
width_mm: number;
height_mm: number;
components: BarcodeLabelComponent[];
}
// 바코드 라벨 마스터 (목록/카드용)
export interface BarcodeLabelMaster {
label_id: string;
label_name_kor: string;
label_name_eng: string | null;
description: string | null;
width_mm?: number;
height_mm?: number;
layout_json?: string | null;
template_type?: string;
use_yn: string;
created_at: string;
created_by: string | null;
updated_at: string | null;
updated_by: string | null;
}
// 목록 조회 응답
export interface GetBarcodeLabelsResponse {
items: BarcodeLabelMaster[];
total: number;
page: number;
limit: number;
}
// 목록 조회 파라미터
export interface GetBarcodeLabelsParams {
page?: number;
limit?: number;
searchText?: string;
useYn?: string;
sortBy?: string;
sortOrder?: "ASC" | "DESC";
}
// 생성 요청
export interface CreateBarcodeLabelRequest {
labelNameKor: string;
labelNameEng?: string;
description?: string;
templateType?: string;
templateId?: string; // 선택 시 해당 템플릿 레이아웃 적용
}
// 수정 요청
export interface UpdateBarcodeLabelRequest {
labelNameKor?: string;
labelNameEng?: string;
description?: string;
templateType?: string;
useYn?: string;
}