[day-02] add user schema and migration
Add elixir struct to represent an user and its corresponding representation on the database.
This commit is contained in:
13
lib/wabanex/user.ex
Normal file
13
lib/wabanex/user.ex
Normal file
@@ -0,0 +1,13 @@
|
||||
defmodule Wabanex.User do
|
||||
use Ecto.Schema
|
||||
|
||||
@primary_key {:id, :binary_id, autogenerate: true}
|
||||
|
||||
schema "users" do
|
||||
field :name, :string
|
||||
field :email, :string
|
||||
field :password, :string
|
||||
|
||||
timestamps()
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user