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

import java.time.OffsetDateTime;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import jakarta.persistence.UniqueConstraint;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

@Entity
@Table(name = "component_definition", uniqueConstraints = {@UniqueConstraint(columnNames = {"technical_name", "dossier_template_id"})})
@Data
@NoArgsConstructor
@EqualsAndHashCode
public class ComponentDefinitionEntity {

    @Id
    @Column(name = "id", nullable = false, updatable = false)
    private String id;

    @Column(name = "dossier_template_id", nullable = false)
    private String dossierTemplateId;

    @Column(name = "technical_name", nullable = false)
    private String technicalName;

    @Column(name = "display_name", nullable = false)
    private String displayName;

    @Column(name = "description")
    private String description;

    @Column(name = "rank")
    private Integer rank;

    @Column(name = "soft_delete_time")
    private OffsetDateTime softDeleteTime;

}
