package cokr.xit.ens.modules.common.domain.support;

import lombok.Builder;
import lombok.Getter;
import lombok.RequiredArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.Lob;

@Embeddable
@Getter
@RequiredArgsConstructor
public class FieldError {

    @Column(name = "error_code", length = 30)
    private String errorCode;

    @Column(name = "error_message")
    @Lob
    private String errorMessage;


    @Builder(builderMethodName = "initBuilder")
    public FieldError(String errorCode, String errorMessage) {
        this.errorCode = errorCode;
        this.errorMessage = errorMessage;
    }
}
