CPF v1.0.0 CPF.Ecto.Type View Source
Provide you functions to use the CPF type in your Ecto schema fields.
Usage
defmodule MyApp.MySchema do
use Ecto.Schema
# Import the cpf_type/1 helper
import CPF.Ecto.Type
schema "my_schemas" do
# use the helpers functions in any field
field :cpf, cpf_type(:string)
end
end
Link to this section Summary
Functions
A parameterized type macro function.
Link to this section Functions
Link to this macro
cpf_type(atom)
View Source
(macro)
cpf_type(atom)
View Source
(macro)
cpf_type(:bigint | :string) :: atom()
cpf_type(:bigint | :string) :: atom()
A parameterized type macro function.
cpf_type(:bigint)is a alias forCPF.Ecto.Type.Bigintcpf_type(:string)is a alias forCPF.Ecto.Type.String