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

import java.io.Serializable;

import jakarta.persistence.Column;
import jakarta.persistence.Embeddable;
import jakarta.persistence.EmbeddedId;
import jakarta.persistence.Entity;
import jakarta.persistence.Table;

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

@Data
@Table(name = "dossier_attribute")
@Entity
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class DossierAttributeEntity {

    @EmbeddedId
    private DossierAttributeEntityId id;

    // TODO Maybe @Lob, for larger images
    @Column(columnDefinition = "TEXT")
    private String value;

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Embeddable
    public static class DossierAttributeEntityId implements Serializable {

        @Column(name = "dossier_id")
        private String dossierId;

        @Column(name = "dossier_attribute_config_id")
        private String dossierAttributeConfigId;

    }

}
