package com.iqser.red.service.persistence.service.v1.api.shared.model.annotations.entitymapped;

import java.util.ArrayList;
import java.util.List;

import com.iqser.red.service.persistence.service.v1.api.shared.model.annotations.Rectangle;
import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.type.DictionaryEntryType;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class ManualRedactionEntry extends BaseAnnotation {

    private String type;
    private String value;
    private String reason;
    private String legalBasis;
    private String section;
    private boolean rectangle;
    private boolean addToDictionary;
    private boolean addToDossierDictionary;
    private List<Rectangle> positions = new ArrayList<>();
    private String textBefore;
    private String textAfter;
    private String sourceId;
    private DictionaryEntryType dictionaryEntryType;


    @Override
    public boolean isLocal() {

        return !(addToDictionary || addToDossierDictionary);
    }

}
