package at.procon.dip.domain.time.entity.leitstand;

import at.procon.dip.architecture.SchemaNames;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Index;
import jakarta.persistence.Table;
import java.math.BigDecimal;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Entity
@Table(schema = SchemaNames.TIME, name = "ls_person", indexes = {
        @Index(name = "idx_ls_person_upd", columnList = "upd"),
        @Index(name = "idx_ls_person_person_nr", columnList = "pers_nr"),
        @Index(name = "idx_ls_person_org_ref", columnList = "organization_dbk")
})
@Getter @Setter @NoArgsConstructor
public class LeitstandPerson extends AbstractLeitstandDbkEntity {
    @Column(name = "pers_nr") private Integer personNumber;
    @Column(name = "last_name", length = 35) private String lastName;
    @Column(name = "first_name", length = 25) private String firstName;
    @Column(name = "category_dbk", length = 24) private String categoryDbk;
    @Column(name = "salutation", length = 15) private String salutation;
    @Column(name = "title", length = 30) private String title;
    @Column(name = "street", length = 36) private String street;
    @Column(name = "postal_code", length = 6) private String postalCode;
    @Column(name = "city", length = 30) private String city;
    @Column(name = "country_code", length = 4) private String countryCode;
    @Column(name = "phone", length = 30) private String phone;
    @Column(name = "fax", length = 30) private String fax;
    @Column(name = "email", length = 50) private String email;
    @Column(name = "cost_per_hour", precision = 8, scale = 3) private BigDecimal costPerHour;
    @Column(name = "organization_dbk", length = 24) private String organizationDbk;
}
