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

@Entity
@Table(schema = SchemaNames.TIME, name = "ls_contract_position", indexes = {
        @Index(name = "idx_ls_contract_position_upd", columnList = "upd"),
        @Index(name = "idx_ls_contract_position_contract_dbk", columnList = "contract_dbk"),
        @Index(name = "idx_ls_contract_position_name", columnList = "name"),
        @Index(name = "idx_ls_contract_position_iref", columnList = "iref")
})
@Getter @Setter @NoArgsConstructor
public class LeitstandContractPosition extends AbstractLeitstandDbkEntity {
    @Column(name = "contract_dbk", length = 24) private String contractDbk;
    @Column(name = "lfdnr") private Integer lfdnr;
    @Column(name = "project_name", length = 255) private String projectName;
    @Column(name = "sales_price", precision = 18, scale = 4) private BigDecimal salesPrice;
    @Column(name = "purchase_price", precision = 18, scale = 4) private BigDecimal purchasePrice;
    @Column(name = "description", length = 255) private String description;
    @Column(name = "valid_from") private OffsetDateTime validFrom;
    @Column(name = "valid_to") private OffsetDateTime validTo;
    @Column(name = "name", length = 255) private String name;
    @Column(name = "iref", length = 255) private String iref;
    @Column(name = "eref", length = 255) private String eref;
}
