package com.iqser.red.service.persistence.management.v1.processor.entity.dossier;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.EnumType;
import jakarta.persistence.Enumerated;
import jakarta.persistence.Id;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.dossier.file.FileAttributeType;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@Entity
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Table(name = "file_attribute_config")
public class FileAttributeConfigEntity {

    @Id
    private String id;
    @Column
    private String csvColumnHeader;
    @Column
    private String label;
    @Column
    private boolean primaryAttribute;
    @Column
    private boolean editable;
    @Column
    private boolean filterable;
    @Column
    private boolean displayedInFileList;
    @Column
    private String placeholder;
    @Column
    @Enumerated(EnumType.STRING)
    private FileAttributeType type = FileAttributeType.TEXT;

    @ManyToOne
    @JsonIgnore
    private DossierTemplateEntity dossierTemplate;

}
