initial commit

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2017-12-08 09:58:14 +01:00
commit 90ceb4f6fe
181 changed files with 8219 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
defmodule Eventos.Accounts.GroupAccount do
use Ecto.Schema
import Ecto.Changeset
alias Eventos.Accounts.{GroupAccount, Account, Group}
@primary_key false
schema "group_accounts" do
field :role, :integer
belongs_to :group, Group
belongs_to :account, Account
timestamps()
end
@doc false
def changeset(%GroupAccount{} = group_account, attrs) do
group_account
|> cast(attrs, [:role])
|> validate_required([:role])
end
end