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

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import java.util.List;

@Getter
@Setter
@Builder
@AllArgsConstructor(access = AccessLevel.PROTECTED)
@JsonInclude(JsonInclude.Include.ALWAYS)
public class SelectResponse { 
    @ApiModelProperty(value = "그리드 리스트")
    private List<Object> selectRows;

    public static SelectResponse toDTO(List<Object> selectRows) {
        if (selectRows == null) return null;
        return SelectResponse.builder() 
                .selectRows(selectRows)
                .build();
    }
}
