Skip to content

Commit

Permalink
Schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
dnsbty committed Aug 18, 2019
1 parent b0e9b35 commit 7e3e04d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/user_admin/users.ex
@@ -0,0 +1,2 @@
defmodule UserAdmin.Users do
end
7 changes: 7 additions & 0 deletions lib/user_admin/users/role.ex
@@ -0,0 +1,7 @@
defmodule UserAdmin.Users.Role do
use Ecto.Schema

schema "roles" do
field :name, :string
end
end
10 changes: 10 additions & 0 deletions lib/user_admin/users/user.ex
@@ -0,0 +1,10 @@
defmodule UserAdmin.Users.User do
use Ecto.Schema
alias UserAdmin.Users.Role

schema "users" do
field :name, :string

belongs_to :role, Role
end
end

0 comments on commit 7e3e04d

Please sign in to comment.