mobilizon.chapril.org-mobil.../lib/eventos/accounts/group_request.ex
Thomas Citharel 90ceb4f6fe initial commit
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2017-12-08 09:58:14 +01:00

21 lines
433 B
Elixir

defmodule Eventos.Accounts.GroupRequest do
use Ecto.Schema
import Ecto.Changeset
alias Eventos.Accounts.{GroupRequest}
schema "group_requests" do
field :state, :integer
field :group_id, :integer
field :account_id, :integer
timestamps()
end
@doc false
def changeset(%GroupRequest{} = group_request, attrs) do
group_request
|> cast(attrs, [:state])
|> validate_required([:state])
end
end