package org.jpos.tcpay.db.entity;

import lombok.Data;
import lombok.experimental.Accessors;
import org.jpos.tcpay.acquirer.LengthMode;

import javax.persistence.*;

@Data
@Accessors(chain = true)
@Entity
@Table(name = "acquirer_connection")
public class AcquirerConnection {
    @Id
    @GeneratedValue
    long id;

    @OneToOne
    @JoinColumn(name = "acquirer_id")
    Acquirer acquirer;

    @Column(name="ip_address")
    String ipAddress;

    @Column(name="port")
    int portNumber;

    @Column(name="is_ssl", nullable = false)
    boolean isSsl;

    @Column(name="keystore_path")
    String keyStorePath;

    @Column(name="keystore_password")
    String keyStorePassword;

    @Column(name="truststore_path")
    String trustStorePath;

    @Column(name="truststore_password")
    String trustStorePassword;

    @Column(name="tpdu")
    String tpdu;

    @Column(name="length_mode")
    @Enumerated(EnumType.STRING)
    LengthMode lengthMode;


}
