package cokr.xit.ens.modules.kkomydoc.model.config;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.SuperBuilder;
import org.hibernate.validator.constraints.Length;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

@Getter
@ToString
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "Document")
public class Document extends DocumentConfKkoMd {

    @Length(max = 40, message = "문서식별번호(외부)의 최대 길이를 초과 했습니다.")
    @NotEmpty(message = "문서식별번호(외부)는 필수 입력값 입니다.")
    @Schema(required = false, title = "문서식별번호(외부)", example = " ")
    private String external_document_uuid;

    @Valid
    @NotNull(message = "수신자정보는 필수 입력값 입니다")
    @Schema(required = true)
    private Receiver receiver;

    @Valid
    @Schema(required = false)
    private XitProperty xit_property;
}
