package br.gov.sigefp.rh.domain;

import br.gov.sigefp.common.domain.AuditableEntity;
import jakarta.persistence.*;
import lombok.*;
import lombok.experimental.SuperBuilder;

/**
 * Entidade que representa um tipo de provento/ganho.
 */
@Entity
@Table(name = "earning_type", indexes = {
        @Index(name = "idx_earning_type_code", columnList = "code")
})
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
public class EarningType extends AuditableEntity {

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

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

    @Column(nullable = false)
    @Builder.Default
    private Boolean taxable = true; // Se o provento é tributável

    @Column(length = 20, name = "economic_class_code")
    private String economicClassCode; // Classificador Económico (ex: 311100)
}
