package cn.palmte.work;

import com.fasterxml.jackson.annotation.JsonIgnore;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;

/**
 * @author <a href="https://github.com/TAKETODAY">Harry Yang</a>
 * @since 2.0 2022/12/30 15:39
 */

@Getter
@Setter
@AllArgsConstructor
public class ValidationError implements Result {

  private Object validation;

  public static ValidationError failed(Object validation) {
    return new ValidationError(validation);
  }

  @JsonIgnore
  public Object getData() {
    return validation;
  }

}
