-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
98 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
defmodule Auth.Group do | ||
use Ecto.Schema | ||
import Ecto.Changeset | ||
|
||
schema "groups" do | ||
field :desc, :binary | ||
field :kind, :integer | ||
field :name, :binary | ||
|
||
timestamps() | ||
end | ||
|
||
@doc false | ||
def changeset(group, attrs) do | ||
group | ||
|> cast(attrs, [:name, :desc, :kind]) | ||
|> validate_required([:name, :desc, :kind]) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,3 @@ | ||
<body> | ||
<header> | ||
<section class="container"> | ||
<h1>Your App Name Here</h1> | ||
</section> | ||
</header> | ||
<%= @inner_content %> | ||
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
defmodule Auth.Repo.Migrations.CreateGroups do | ||
use Ecto.Migration | ||
|
||
def change do | ||
create table(:groups) do | ||
add :name, :binary | ||
add :desc, :binary | ||
add :kind, :integer | ||
|
||
timestamps() | ||
end | ||
end | ||
end |