mobilizon.chapril.org-mobil.../lib/mobilizon/actors/member/metadata.ex
Thomas Citharel 41f086e2c9
Spec improvements
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-09-27 09:42:12 +02:00

28 lines
546 B
Elixir
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

defmodule Mobilizon.Actors.Member.Metadata do
@moduledoc """
Represents metadata on a membership
"""
use Ecto.Schema
import Ecto.Changeset
@type t :: %__MODULE__{}
@required_attrs []
@optional_attrs []
@attrs @required_attrs ++ @optional_attrs
embedded_schema do
# TODO : Use this space to put notes when someone is invited / requested to join
end
@doc false
@spec changeset(t | Ecto.Schema.t(), map) :: Ecto.Changeset.t()
def changeset(schema, params) do
schema
|> cast(params, @attrs)
end
end