defmodule Bump.Messages.Message do use Ecto.Schema import Ecto.Changeset schema "messages" do field :sender, :string field :data, :string, default: "" field :timestamp, :utc_datetime timestamps() end def changeset(message, params) do message |> cast(params, [:sender, :data, :timestamp]) end end