defmodule DaProductApp.Acquirer.AcquirerConnection do use Ecto.Schema import Ecto.Changeset @primary_key {:id, :integer, autogenerate: false} schema "acquirer_connection" do field :acquirer_id, :integer field :ip_address, :string field :port, :integer field :is_ssl, :integer field :keystore_path, :string field :keystore_password, :string field :truststore_path, :string field :truststore_password, :string field :tpdu, :string field :length_mode, :string end def changeset(connection, attrs) do connection |> cast(attrs, [ :acquirer_id, :ip_address, :port, :is_ssl, :keystore_path, :keystore_password, :truststore_path, :truststore_password, :tpdu, :length_mode ]) |> validate_required([:ip_address, :port]) end end