katbin/lib/ketbin/schema/user.ex
supercmmetry 9613fcebde
feat(user): add ecto migration for user
Signed-off-by: supercmmetry <vishaals2000@gmail.com>
2021-08-09 14:28:53 +05:30

18 lines
292 B
Elixir

defmodule Ketbin.Schema.User do
use Ecto.Schema
import Ecto.Changeset
schema "users" do
field :firebase_id, :string
timestamps()
end
@doc false
def changeset(user, attrs) do
user
|> cast(attrs, [:firebase_id])
|> validate_required([:firebase_id])
end
end