package br.gov.sigefp.org.domain;

import br.gov.sigefp.common.domain.BaseEntity;
import jakarta.persistence.*;
import lombok.*;

/**
 * Entidade que representa um ministério.
 */
@Entity
@Table(name = "ministry", indexes = {
    @Index(name = "idx_ministry_code", columnList = "code")
})
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class Ministry extends BaseEntity {

    @Column(nullable = false, unique = true, length = 50)
    private String code;

    @Column(nullable = false, length = 200)
    private String name;

    @Column(length = 20)
    private String acronym;

    @Column(length = 255)
    private String description;

    @Column(columnDefinition = "TEXT")
    private String logo;

    @Column(nullable = false, name = "is_active")
    @Builder.Default
    private Boolean isActive = true;
}

