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.time.OffsetDateTime;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Entity
@Table(schema = SchemaNames.TIME, name = "ls_contract", indexes = {
        @Index(name = "idx_ls_contract_upd", columnList = "upd"),
        @Index(name = "idx_ls_contract_org_dbk", columnList = "organization_dbk"),
        @Index(name = "idx_ls_contract_name", columnList = "name"),
        @Index(name = "idx_ls_contract_iref", columnList = "iref")
})
@Getter @Setter @NoArgsConstructor
public class LeitstandContract extends AbstractLeitstandDbkEntity {
    @Column(name = "organization_dbk", length = 24) private String organizationDbk;
    @Column(name = "lfdnr") private Integer lfdnr;
    @Column(name = "name", length = 255) private String name;
    @Column(name = "iref", length = 255) private String iref;
    @Column(name = "eref", length = 255) private String eref;
    @Column(name = "description", length = 255) private String description;
    @Column(name = "valid_from") private OffsetDateTime validFrom;
    @Column(name = "valid_to") private OffsetDateTime validTo;
}
