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

import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.List;

import com.iqser.red.service.persistence.service.v1.api.shared.model.annotations.AnnotationStatus;
import com.iqser.red.service.persistence.service.v1.api.shared.model.annotations.Rectangle;

import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class ManualResizeRedaction extends BaseAnnotation {

    private String value;
    private List<Rectangle> positions = new ArrayList<>();
    private String textBefore;
    private String textAfter;
    private Boolean updateDictionary;
    private boolean addToAllDossiers;


    @Builder
    public ManualResizeRedaction(String annotationId,
                                 String fileId,
                                 String user,
                                 AnnotationStatus status,
                                 OffsetDateTime requestDate,
                                 OffsetDateTime processedDate,
                                 OffsetDateTime softDeletedTime,
                                 String value,
                                 String textBefore,
                                 String textAfter,
                                 List<Rectangle> positions) {

        super(annotationId, fileId, user, status, requestDate, processedDate, softDeletedTime);
        this.textBefore = textBefore;
        this.textAfter = textAfter;
        this.value = value;
        this.positions = positions != null ? positions : new ArrayList<>();
    }

}
