package com.oqpo.api.web.dto.response.stockmng;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.oqpo.api.entity.stockmng.StckMgntBaseInfoEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

@Getter
@Setter
@Builder
@AllArgsConstructor(access = AccessLevel.PROTECTED)
@JsonInclude(JsonInclude.Include.ALWAYS)
public class WhsItemInfoResponse {

    @ApiModelProperty(value = "품목아이디")
    private String itemId;
    @ApiModelProperty(value = "품목명")
    private String itemNm;
    @ApiModelProperty(value = "실사수량")
    private String excelQty;

    public static WhsItemInfoResponse toDTO(StckMgntBaseInfoEntity entity) {
        if (entity == null) return null;
        return WhsItemInfoResponse.builder()
                .itemId(entity.getItemId())
                .itemNm(entity.getItemNm())
                .excelQty(entity.getExcelQty())
                .build();
    }
}
