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

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.MapsId;
import jakarta.persistence.OneToOne;
import jakarta.persistence.Table;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.iqser.red.service.persistence.management.v1.processor.entity.dossier.DossierTemplateEntity;

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

@Data
@Entity
@Table(name = "file_attribute_general_configuration")
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class FileAttributesGeneralConfigurationEntity {

    @Id
    @Column(name = "dossier_template_id")
    private String dossierTemplateId;
    @Column
    private String filenameMappingColumnHeaderName;
    @Column
    private String delimiter;
    @Column
    private String encoding;

    @OneToOne
    @JsonIgnore
    @MapsId("dossierTemplateId")
    private DossierTemplateEntity dossierTemplate;

}
