package com.cloudhandson.ddsbackoffice.domain;

import java.util.List;

public record DdsQueryResult(
    String userKey,
    String sourceKey,
    String userLabel,
    String sourceLabel,
    String objectName,
    boolean success,
    String title,
    String message,
    String sessionUser,
    String endUser,
    Integer oracleCode,
    List<DdsCustomerRow> rows
) {

  public DdsQueryResult {
    rows = rows == null ? List.of() : List.copyOf(rows);
  }

  public boolean hasRows() {
    return !rows.isEmpty();
  }
}
